diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-11-23 11:57:51 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-01-03 22:52:35 -0500 |
commit | a561be7100cd610bd2e082f3211c1dfb45835817 (patch) | |
tree | a1016a11df967be6f289a4e8ae29597ba39df17e /fs/btrfs | |
parent | f47ec3f28354795f000c14bf18ed967ec81a3ec3 (diff) | |
download | linux-3.10-a561be7100cd610bd2e082f3211c1dfb45835817.tar.gz linux-3.10-a561be7100cd610bd2e082f3211c1dfb45835817.tar.bz2 linux-3.10-a561be7100cd610bd2e082f3211c1dfb45835817.zip |
switch a bunch of places to mnt_want_write_file()
it's both faster (in case when file has been opened for write) and cleaner.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/ioctl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index c04f02c7d5b..20dd8f3b6c7 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -201,7 +201,7 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg) } } - ret = mnt_want_write(file->f_path.mnt); + ret = mnt_want_write_file(file); if (ret) goto out_unlock; @@ -1855,7 +1855,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, goto out; } - err = mnt_want_write(file->f_path.mnt); + err = mnt_want_write_file(file); if (err) goto out; @@ -1987,7 +1987,7 @@ static int btrfs_ioctl_defrag(struct file *file, void __user *argp) if (btrfs_root_readonly(root)) return -EROFS; - ret = mnt_want_write(file->f_path.mnt); + ret = mnt_want_write_file(file); if (ret) return ret; @@ -2195,7 +2195,7 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd, if (btrfs_root_readonly(root)) return -EROFS; - ret = mnt_want_write(file->f_path.mnt); + ret = mnt_want_write_file(file); if (ret) return ret; @@ -2549,7 +2549,7 @@ static long btrfs_ioctl_trans_start(struct file *file) if (btrfs_root_readonly(root)) goto out; - ret = mnt_want_write(file->f_path.mnt); + ret = mnt_want_write_file(file); if (ret) goto out; |