[PATCH] fs: add lock annotation to grab_super
authorJosh Triplett <[email protected]>
Fri, 29 Sep 2006 08:59:29 +0000 (01:59 -0700)
committerLinus Torvalds <[email protected]>
Fri, 29 Sep 2006 16:18:08 +0000 (09:18 -0700)
grab_super gets called with sb_lock held, and releases it.  Add a lock
annotation to this function so that sparse can check callers for lock
pairing, and so that sparse will not complain about this function since it
intentionally uses the lock in this manner.

Signed-off-by: Josh Triplett <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/super.c

index 5c4c94d5495e42588c9aef5a9fe4271d54f1da24..6987824d0dce0ec94713d3f394e8d2c8535c04aa 100644 (file)
@@ -199,7 +199,7 @@ EXPORT_SYMBOL(deactivate_super);
  *     success, 0 if we had failed (superblock contents was already dead or
  *     dying when grab_super() had been called).
  */
-static int grab_super(struct super_block *s)
+static int grab_super(struct super_block *s) __releases(sb_lock)
 {
        s->s_count++;
        spin_unlock(&sb_lock);