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/ext2 | |
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/ext2')
-rw-r--r-- | fs/ext2/ioctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ext2/ioctl.c b/fs/ext2/ioctl.c index f81e250ac5c4..61a3f9661728 100644 --- a/fs/ext2/ioctl.c +++ b/fs/ext2/ioctl.c | |||
@@ -35,7 +35,7 @@ long ext2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | |||
35 | case EXT2_IOC_SETFLAGS: { | 35 | case EXT2_IOC_SETFLAGS: { |
36 | unsigned int oldflags; | 36 | unsigned int oldflags; |
37 | 37 | ||
38 | ret = mnt_want_write(filp->f_path.mnt); | 38 | ret = mnt_want_write_file(filp); |
39 | if (ret) | 39 | if (ret) |
40 | return ret; | 40 | return ret; |
41 | 41 | ||
@@ -91,7 +91,7 @@ setflags_out: | |||
91 | case EXT2_IOC_SETVERSION: | 91 | case EXT2_IOC_SETVERSION: |
92 | if (!inode_owner_or_capable(inode)) | 92 | if (!inode_owner_or_capable(inode)) |
93 | return -EPERM; | 93 | return -EPERM; |
94 | ret = mnt_want_write(filp->f_path.mnt); | 94 | ret = mnt_want_write_file(filp); |
95 | if (ret) | 95 | if (ret) |
96 | return ret; | 96 | return ret; |
97 | if (get_user(inode->i_generation, (int __user *) arg)) { | 97 | if (get_user(inode->i_generation, (int __user *) arg)) { |
@@ -121,7 +121,7 @@ setflags_out: | |||
121 | if (get_user(rsv_window_size, (int __user *)arg)) | 121 | if (get_user(rsv_window_size, (int __user *)arg)) |
122 | return -EFAULT; | 122 | return -EFAULT; |
123 | 123 | ||
124 | ret = mnt_want_write(filp->f_path.mnt); | 124 | ret = mnt_want_write_file(filp); |
125 | if (ret) | 125 | if (ret) |
126 | return ret; | 126 | return ret; |
127 | 127 | ||