summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorLiu Bo <liubo2009@cn.fujitsu.com>2012-06-29 11:58:48 +0200
committerChris Mason <chris.mason@fusionio.com>2012-07-23 22:27:57 +0200
commite54bfa31044d602a57d4e190f6d1c3763ea76bfe (patch)
tree5274bf7cf782bbcaeab1505c51f4eb5d58a20448 /fs/btrfs/ioctl.c
parentBtrfs: remove redundant r/o check for superblock (diff)
downloadlinux-e54bfa31044d602a57d4e190f6d1c3763ea76bfe.tar.xz
linux-e54bfa31044d602a57d4e190f6d1c3763ea76bfe.zip
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: Liu Bo <liubo2009@cn.fujitsu.com>
Diffstat (limited to '')
-rw-r--r--fs/btrfs/ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index b8034dc62e38..13ed1c9534cc 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -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 @@ out_bargs:
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;
}