aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-11-23 11:57:51 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-01-03 22:52:35 -0500
commita561be7100cd610bd2e082f3211c1dfb45835817 (patch)
treea1016a11df967be6f289a4e8ae29597ba39df17e /fs/btrfs
parentf47ec3f28354795f000c14bf18ed967ec81a3ec3 (diff)
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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index c04f02c7d5bb..20dd8f3b6c72 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)
201 } 201 }
202 } 202 }
203 203
204 ret = mnt_want_write(file->f_path.mnt); 204 ret = mnt_want_write_file(file);
205 if (ret) 205 if (ret)
206 goto out_unlock; 206 goto out_unlock;
207 207
@@ -1855,7 +1855,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file,
1855 goto out; 1855 goto out;
1856 } 1856 }
1857 1857
1858 err = mnt_want_write(file->f_path.mnt); 1858 err = mnt_want_write_file(file);
1859 if (err) 1859 if (err)
1860 goto out; 1860 goto out;
1861 1861
@@ -1987,7 +1987,7 @@ static int btrfs_ioctl_defrag(struct file *file, void __user *argp)
1987 if (btrfs_root_readonly(root)) 1987 if (btrfs_root_readonly(root))
1988 return -EROFS; 1988 return -EROFS;
1989 1989
1990 ret = mnt_want_write(file->f_path.mnt); 1990 ret = mnt_want_write_file(file);
1991 if (ret) 1991 if (ret)
1992 return ret; 1992 return ret;
1993 1993
@@ -2195,7 +2195,7 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
2195 if (btrfs_root_readonly(root)) 2195 if (btrfs_root_readonly(root))
2196 return -EROFS; 2196 return -EROFS;
2197 2197
2198 ret = mnt_want_write(file->f_path.mnt); 2198 ret = mnt_want_write_file(file);
2199 if (ret) 2199 if (ret)
2200 return ret; 2200 return ret;
2201 2201
@@ -2549,7 +2549,7 @@ static long btrfs_ioctl_trans_start(struct file *file)
2549 if (btrfs_root_readonly(root)) 2549 if (btrfs_root_readonly(root))
2550 goto out; 2550 goto out;
2551 2551
2552 ret = mnt_want_write(file->f_path.mnt); 2552 ret = mnt_want_write_file(file);
2553 if (ret) 2553 if (ret)
2554 goto out; 2554 goto out;
2555 2555