Browse Source

[PATCH] fs: add lock annotation to grab_super

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 <josh@freedesktop.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Josh Triplett 18 years ago
parent
commit
9c4dbee79d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      fs/super.c

+ 1 - 1
fs/super.c

@@ -199,7 +199,7 @@ EXPORT_SYMBOL(deactivate_super);
  *	success, 0 if we had failed (superblock contents was already dead or
  *	success, 0 if we had failed (superblock contents was already dead or
  *	dying when grab_super() had been called).
  *	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++;
 	s->s_count++;
 	spin_unlock(&sb_lock);
 	spin_unlock(&sb_lock);