Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
sb = get_active_super(bdev);
if (!sb)
goto out;
+ down_write(&sb->s_umount);
if (sb->s_flags & MS_RDONLY) {
sb->s_frozen = SB_FREEZE_TRANS;
up_write(&sb->s_umount);
{
if (atomic_inc_not_zero(&s->s_active)) {
spin_unlock(&sb_lock);
- down_write(&s->s_umount);
return 1;
}
/* it's going away */
up_write(&s->s_umount);
destroy_super(s);
}
+ down_write(&old->s_umount);
return old;
}
}
*
* 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)
{