btrfs: switch btrfs_ioctl_balance() to mnt_want_write_file()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -3268,7 +3268,7 @@ static long btrfs_ioctl_balance(struct file *file, void __user *arg)
|
|||||||
if (fs_info->sb->s_flags & MS_RDONLY)
|
if (fs_info->sb->s_flags & MS_RDONLY)
|
||||||
return -EROFS;
|
return -EROFS;
|
||||||
|
|
||||||
ret = mnt_want_write(file->f_path.mnt);
|
ret = mnt_want_write_file(file);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
@@ -3338,7 +3338,7 @@ out_bargs:
|
|||||||
out:
|
out:
|
||||||
mutex_unlock(&fs_info->balance_mutex);
|
mutex_unlock(&fs_info->balance_mutex);
|
||||||
mutex_unlock(&fs_info->volume_mutex);
|
mutex_unlock(&fs_info->volume_mutex);
|
||||||
mnt_drop_write(file->f_path.mnt);
|
mnt_drop_write_file(file);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user