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/ext4/ioctl.c | |
parent | f47ec3f28354795f000c14bf18ed967ec81a3ec3 (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/ext4/ioctl.c')
-rw-r--r-- | fs/ext4/ioctl.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c index a56796814d6a..9a49760b554d 100644 --- a/fs/ext4/ioctl.c +++ b/fs/ext4/ioctl.c | |||
@@ -45,7 +45,7 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
45 | if (get_user(flags, (int __user *) arg)) | 45 | if (get_user(flags, (int __user *) arg)) |
46 | return -EFAULT; | 46 | return -EFAULT; |
47 | 47 | ||
48 | err = mnt_want_write(filp->f_path.mnt); | 48 | err = mnt_want_write_file(filp); |
49 | if (err) | 49 | if (err) |
50 | return err; | 50 | return err; |
51 | 51 | ||
@@ -150,7 +150,7 @@ flags_out: | |||
150 | if (!inode_owner_or_capable(inode)) | 150 | if (!inode_owner_or_capable(inode)) |
151 | return -EPERM; | 151 | return -EPERM; |
152 | 152 | ||
153 | err = mnt_want_write(filp->f_path.mnt); | 153 | err = mnt_want_write_file(filp); |
154 | if (err) | 154 | if (err) |
155 | return err; | 155 | return err; |
156 | if (get_user(generation, (int __user *) arg)) { | 156 | if (get_user(generation, (int __user *) arg)) { |
@@ -192,7 +192,7 @@ setversion_out: | |||
192 | return -EOPNOTSUPP; | 192 | return -EOPNOTSUPP; |
193 | } | 193 | } |
194 | 194 | ||
195 | err = mnt_want_write(filp->f_path.mnt); | 195 | err = mnt_want_write_file(filp); |
196 | if (err) | 196 | if (err) |
197 | return err; | 197 | return err; |
198 | 198 | ||
@@ -240,7 +240,7 @@ setversion_out: | |||
240 | return -EOPNOTSUPP; | 240 | return -EOPNOTSUPP; |
241 | } | 241 | } |
242 | 242 | ||
243 | err = mnt_want_write(filp->f_path.mnt); | 243 | err = mnt_want_write_file(filp); |
244 | if (err) | 244 | if (err) |
245 | goto mext_out; | 245 | goto mext_out; |
246 | 246 | ||
@@ -277,7 +277,7 @@ mext_out: | |||
277 | return -EOPNOTSUPP; | 277 | return -EOPNOTSUPP; |
278 | } | 278 | } |
279 | 279 | ||
280 | err = mnt_want_write(filp->f_path.mnt); | 280 | err = mnt_want_write_file(filp); |
281 | if (err) | 281 | if (err) |
282 | return err; | 282 | return err; |
283 | 283 | ||
@@ -301,7 +301,7 @@ mext_out: | |||
301 | if (!inode_owner_or_capable(inode)) | 301 | if (!inode_owner_or_capable(inode)) |
302 | return -EACCES; | 302 | return -EACCES; |
303 | 303 | ||
304 | err = mnt_want_write(filp->f_path.mnt); | 304 | err = mnt_want_write_file(filp); |
305 | if (err) | 305 | if (err) |
306 | return err; | 306 | return err; |
307 | /* | 307 | /* |
@@ -323,7 +323,7 @@ mext_out: | |||
323 | if (!inode_owner_or_capable(inode)) | 323 | if (!inode_owner_or_capable(inode)) |
324 | return -EACCES; | 324 | return -EACCES; |
325 | 325 | ||
326 | err = mnt_want_write(filp->f_path.mnt); | 326 | err = mnt_want_write_file(filp); |
327 | if (err) | 327 | if (err) |
328 | return err; | 328 | return err; |
329 | err = ext4_alloc_da_blocks(inode); | 329 | err = ext4_alloc_da_blocks(inode); |