提交 e54bfa31 编写于 作者: L Liu Bo 提交者: Chris Mason

Btrfs: use mnt_want_write_file instead of mnt_want_write

mnt_want_write_file is faster when file has been opened for write.
Signed-off-by: NLiu Bo <liubo2009@cn.fujitsu.com>
上级 768e9dfe
......@@ -3265,7 +3265,7 @@ static long btrfs_ioctl_balance(struct file *file, void __user *arg)
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
ret = mnt_want_write(file->f_path.mnt);
ret = mnt_want_write_file(file);
if (ret)
return ret;
......@@ -3335,7 +3335,7 @@ static long btrfs_ioctl_balance(struct file *file, void __user *arg)
out:
mutex_unlock(&fs_info->balance_mutex);
mutex_unlock(&fs_info->volume_mutex);
mnt_drop_write(file->f_path.mnt);
mnt_drop_write_file(file);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册