Skip to contentSkip to conversation

Add lock annotation to grab_super

PATCH New Josh Triplett 1 participant 1 message Jul 26, 2006 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 fs/super.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/super.c +1 -1
index 6d4e817..97a521c 100644
@@ -198,7 +198,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);