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/ext3 | |
| 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/ext3')
| -rw-r--r-- | fs/ext3/ioctl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ext3/ioctl.c b/fs/ext3/ioctl.c index ba1b54e23cae..a02863a080d3 100644 --- a/fs/ext3/ioctl.c +++ b/fs/ext3/ioctl.c | |||
| @@ -44,7 +44,7 @@ long ext3_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
| 44 | if (get_user(flags, (int __user *) arg)) | 44 | if (get_user(flags, (int __user *) arg)) |
| 45 | return -EFAULT; | 45 | return -EFAULT; |
| 46 | 46 | ||
| 47 | err = mnt_want_write(filp->f_path.mnt); | 47 | err = mnt_want_write_file(filp); |
| 48 | if (err) | 48 | if (err) |
| 49 | return err; | 49 | return err; |
| 50 | 50 | ||
| @@ -126,7 +126,7 @@ flags_out: | |||
| 126 | if (!inode_owner_or_capable(inode)) | 126 | if (!inode_owner_or_capable(inode)) |
| 127 | return -EPERM; | 127 | return -EPERM; |
| 128 | 128 | ||
| 129 | err = mnt_want_write(filp->f_path.mnt); | 129 | err = mnt_want_write_file(filp); |
| 130 | if (err) | 130 | if (err) |
| 131 | return err; | 131 | return err; |
| 132 | if (get_user(generation, (int __user *) arg)) { | 132 | if (get_user(generation, (int __user *) arg)) { |
| @@ -164,7 +164,7 @@ setversion_out: | |||
| 164 | if (!test_opt(inode->i_sb, RESERVATION) ||!S_ISREG(inode->i_mode)) | 164 | if (!test_opt(inode->i_sb, RESERVATION) ||!S_ISREG(inode->i_mode)) |
| 165 | return -ENOTTY; | 165 | return -ENOTTY; |
| 166 | 166 | ||
| 167 | err = mnt_want_write(filp->f_path.mnt); | 167 | err = mnt_want_write_file(filp); |
| 168 | if (err) | 168 | if (err) |
| 169 | return err; | 169 | return err; |
| 170 | 170 | ||
| @@ -206,7 +206,7 @@ setrsvsz_out: | |||
| 206 | if (!capable(CAP_SYS_RESOURCE)) | 206 | if (!capable(CAP_SYS_RESOURCE)) |
| 207 | return -EPERM; | 207 | return -EPERM; |
| 208 | 208 | ||
| 209 | err = mnt_want_write(filp->f_path.mnt); | 209 | err = mnt_want_write_file(filp); |
| 210 | if (err) | 210 | if (err) |
| 211 | return err; | 211 | return err; |
| 212 | 212 | ||
| @@ -232,7 +232,7 @@ group_extend_out: | |||
| 232 | if (!capable(CAP_SYS_RESOURCE)) | 232 | if (!capable(CAP_SYS_RESOURCE)) |
| 233 | return -EPERM; | 233 | return -EPERM; |
| 234 | 234 | ||
| 235 | err = mnt_want_write(filp->f_path.mnt); | 235 | err = mnt_want_write_file(filp); |
| 236 | if (err) | 236 | if (err) |
| 237 | return err; | 237 | return err; |
| 238 | 238 | ||
