From d3f2147307cce9eac56dd91d381709aa3f1615b3 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 23 Mar 2010 11:11:05 -0400 Subject: Move grabbing s_umount to callers of grab_super() Signed-off-by: Al Viro --- fs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs/super.c') diff --git a/fs/super.c b/fs/super.c index dba74e7..61fa181 100644 --- a/fs/super.c +++ b/fs/super.c @@ -210,7 +210,6 @@ static int grab_super(struct super_block *s) __releases(sb_lock) { if (atomic_inc_not_zero(&s->s_active)) { spin_unlock(&sb_lock); - down_write(&s->s_umount); return 1; } /* it's going away */ @@ -317,6 +316,7 @@ retry: up_write(&s->s_umount); destroy_super(s); } + down_write(&old->s_umount); return old; } } @@ -466,7 +466,7 @@ EXPORT_SYMBOL(get_super); * * Scans the superblock list and finds the superblock of the file system * mounted on the device given. Returns the superblock with an active - * reference and s_umount held exclusively or %NULL if none was found. + * reference or %NULL if none was found. */ struct super_block *get_active_super(struct block_device *bdev) { -- cgit v1.1