summaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-03-21 22:34:11 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-05-21 18:31:14 -0400
commit389b8be6ef419397e4f176652927ebad6ebb4b77 (patch)
tree941037c2296b94b30f4a883235f54930b6aa485e /fs/super.c
parent79d7e39ee1d4b423206f6cfd2cd2eed6253d95fe (diff)
downloadlinux-389b8be6ef419397e4f176652927ebad6ebb4b77.tar.gz
linux-389b8be6ef419397e4f176652927ebad6ebb4b77.tar.bz2
linux-389b8be6ef419397e4f176652927ebad6ebb4b77.zip
get rid of open-coded grab_super() in get_active_super()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/fs/super.c b/fs/super.c
index 156eae5ed503..d8c8b1d2d010 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -487,22 +487,9 @@ struct super_block *get_active_super(struct block_device *bdev)
if (sb->s_bdev != bdev)
continue;
- sb->s_count++;
- spin_unlock(&sb_lock);
- down_write(&sb->s_umount);
- if (sb->s_root) {
- spin_lock(&sb_lock);
- if (sb->s_count > S_BIAS) {
- atomic_inc(&sb->s_active);
- sb->s_count--;
- spin_unlock(&sb_lock);
- return sb;
- }
- spin_unlock(&sb_lock);
- }
- up_write(&sb->s_umount);
- put_super(sb);
- yield();
+ if (grab_super(sb)) /* drops sb_lock */
+ return sb;
+
spin_lock(&sb_lock);
}
spin_unlock(&sb_lock);