Skip to contentSkip to conversation

gfs2: trivial sparse lock annotations

PATCH In review Harvey Harrison 2 participants 2 messages May 30, 2008 GFS2 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gfs2: trivial sparse lock annotations

Annotate the &sdp->sd_log_lock.

---
 fs/gfs2/log.c |    2 ++
 fs/gfs2/log.h |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)
fs/gfs2/log.c +2 -0
index 548264b..6c6af9f 100644
@@ -87,6 +87,8 @@ void gfs2_remove_from_ail(struct gfs2_bufdata *bd)
  */
 
 static void gfs2_ail1_start_one(struct gfs2_sbd *sdp, struct gfs2_ail *ai)
+__releases(&sdp->sd_log_lock)
+__acquires(&sdp->sd_log_lock)
 {
 	struct gfs2_bufdata *bd, *s;
 	struct buffer_head *bh;
fs/gfs2/log.h +2 -0
index 7711528..7c64510 100644
@@ -21,6 +21,7 @@
  */
 
 static inline void gfs2_log_lock(struct gfs2_sbd *sdp)
+__acquires(&sdp->sd_log_lock)
 {
 	spin_lock(&sdp->sd_log_lock);
 }
@@ -32,6 +33,7 @@ static inline void gfs2_log_lock(struct gfs2_sbd *sdp)
  */
 
 static inline void gfs2_log_unlock(struct gfs2_sbd *sdp)
+__releases(&sdp->sd_log_lock)
 {
 	spin_unlock(&sdp->sd_log_lock);
 }
Signature · 1 line
1.5.6.rc0.277.g804cf
#1 lore raw

Hi,

Now in the GFS2 -nmw git tree. Thanks,

Steve.

Quoted 41 lines · Harvey Harrison

Annotate the &sdp->sd_log_lock.

---
 fs/gfs2/log.c |    2 ++
 fs/gfs2/log.h |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)
fs/gfs2/log.c +2 -0
index 548264b..6c6af9f 100644
@@ -87,6 +87,8 @@ void gfs2_remove_from_ail(struct gfs2_bufdata *bd)
  */
 
 static void gfs2_ail1_start_one(struct gfs2_sbd *sdp, struct gfs2_ail *ai)
+__releases(&sdp->sd_log_lock)
+__acquires(&sdp->sd_log_lock)
 {
 	struct gfs2_bufdata *bd, *s;
 	struct buffer_head *bh;
fs/gfs2/log.h +2 -0
index 7711528..7c64510 100644
@@ -21,6 +21,7 @@
  */
 
 static inline void gfs2_log_lock(struct gfs2_sbd *sdp)
+__acquires(&sdp->sd_log_lock)
 {
 	spin_lock(&sdp->sd_log_lock);
 }
@@ -32,6 +33,7 @@ static inline void gfs2_log_lock(struct gfs2_sbd *sdp)
  */
 
 static inline void gfs2_log_unlock(struct gfs2_sbd *sdp)
+__releases(&sdp->sd_log_lock)
 {
 	spin_unlock(&sdp->sd_log_lock);
 }