Skip to content

Commit

Permalink
get rid of open-coded grab_super() in get_active_super()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed May 21, 2010
1 parent 79d7e39 commit 389b8be
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions fs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 389b8be

Please sign in to comment.