aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--fs/btrfs/ioctl.c10
-rw-r--r--fs/ext2/ioctl.c6
-rw-r--r--fs/ext3/ioctl.c10
-rw-r--r--fs/ext4/ioctl.c14
-rw-r--r--fs/fat/file.c2
-rw-r--r--fs/gfs2/file.c2
-rw-r--r--fs/hfsplus/ioctl.c2
-rw-r--r--fs/jfs/ioctl.c2
-rw-r--r--fs/nfsd/nfs4recover.c6
-rw-r--r--fs/nilfs2/ioctl.c12
-rw-r--r--fs/ocfs2/ioctl.c2
-rw-r--r--fs/ocfs2/move_extents.c2
-rw-r--r--fs/reiserfs/ioctl.c4
-rw-r--r--fs/ubifs/ioctl.c2
-rw-r--r--fs/xfs/xfs_ioctl.c4
-rw-r--r--fs/xfs/xfs_ioctl32.c4
16 files changed, 42 insertions, 42 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
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
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
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);
diff --git a/fs/fat/file.c b/fs/fat/file.c
index c118acf16e43..50746a1a0789 100644
--- a/fs/fat/file.c
+++ b/fs/fat/file.c
@@ -44,7 +44,7 @@ static int fat_ioctl_set_attributes(struct file *file, u32 __user *user_attr)
44 goto out; 44 goto out;
45 45
46 mutex_lock(&inode->i_mutex); 46 mutex_lock(&inode->i_mutex);
47 err = mnt_want_write(file->f_path.mnt); 47 err = mnt_want_write_file(file);
48 if (err) 48 if (err)
49 goto out_unlock_inode; 49 goto out_unlock_inode;
50 50
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index ce36a56dfeac..28fc6e3855f3 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -223,7 +223,7 @@ static int do_gfs2_set_flags(struct file *filp, u32 reqflags, u32 mask)
223 int error; 223 int error;
224 u32 new_flags, flags; 224 u32 new_flags, flags;
225 225
226 error = mnt_want_write(filp->f_path.mnt); 226 error = mnt_want_write_file(filp);
227 if (error) 227 if (error)
228 return error; 228 return error;
229 229
diff --git a/fs/hfsplus/ioctl.c b/fs/hfsplus/ioctl.c
index fbaa6690c8e0..31d3fe576429 100644
--- a/fs/hfsplus/ioctl.c
+++ b/fs/hfsplus/ioctl.c
@@ -43,7 +43,7 @@ static int hfsplus_ioctl_setflags(struct file *file, int __user *user_flags)
43 unsigned int flags; 43 unsigned int flags;
44 int err = 0; 44 int err = 0;
45 45
46 err = mnt_want_write(file->f_path.mnt); 46 err = mnt_want_write_file(file);
47 if (err) 47 if (err)
48 goto out; 48 goto out;
49 49
diff --git a/fs/jfs/ioctl.c b/fs/jfs/ioctl.c
index 6f98a1866776..73d9eaa91c05 100644
--- a/fs/jfs/ioctl.c
+++ b/fs/jfs/ioctl.c
@@ -68,7 +68,7 @@ long jfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
68 unsigned int oldflags; 68 unsigned int oldflags;
69 int err; 69 int err;
70 70
71 err = mnt_want_write(filp->f_path.mnt); 71 err = mnt_want_write_file(filp);
72 if (err) 72 if (err)
73 return err; 73 return err;
74 74
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
index ed083b9a731b..a9aa2f161262 100644
--- a/fs/nfsd/nfs4recover.c
+++ b/fs/nfsd/nfs4recover.c
@@ -147,7 +147,7 @@ nfsd4_create_clid_dir(struct nfs4_client *clp)
147 status = -EEXIST; 147 status = -EEXIST;
148 if (dentry->d_inode) 148 if (dentry->d_inode)
149 goto out_put; 149 goto out_put;
150 status = mnt_want_write(rec_file->f_path.mnt); 150 status = mnt_want_write_file(rec_file);
151 if (status) 151 if (status)
152 goto out_put; 152 goto out_put;
153 status = vfs_mkdir(dir->d_inode, dentry, S_IRWXU); 153 status = vfs_mkdir(dir->d_inode, dentry, S_IRWXU);
@@ -268,7 +268,7 @@ nfsd4_remove_clid_dir(struct nfs4_client *clp)
268 if (!rec_file || !clp->cl_firststate) 268 if (!rec_file || !clp->cl_firststate)
269 return; 269 return;
270 270
271 status = mnt_want_write(rec_file->f_path.mnt); 271 status = mnt_want_write_file(rec_file);
272 if (status) 272 if (status)
273 goto out; 273 goto out;
274 clp->cl_firststate = 0; 274 clp->cl_firststate = 0;
@@ -311,7 +311,7 @@ nfsd4_recdir_purge_old(void) {
311 311
312 if (!rec_file) 312 if (!rec_file)
313 return; 313 return;
314 status = mnt_want_write(rec_file->f_path.mnt); 314 status = mnt_want_write_file(rec_file);
315 if (status) 315 if (status)
316 goto out; 316 goto out;
317 status = nfsd4_list_rec_dir(purge_old); 317 status = nfsd4_list_rec_dir(purge_old);
diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c
index ac258beeda3c..b7697d1ccd61 100644
--- a/fs/nilfs2/ioctl.c
+++ b/fs/nilfs2/ioctl.c
@@ -27,7 +27,7 @@
27#include <linux/uaccess.h> /* copy_from_user(), copy_to_user() */ 27#include <linux/uaccess.h> /* copy_from_user(), copy_to_user() */
28#include <linux/vmalloc.h> 28#include <linux/vmalloc.h>
29#include <linux/compat.h> /* compat_ptr() */ 29#include <linux/compat.h> /* compat_ptr() */
30#include <linux/mount.h> /* mnt_want_write(), mnt_drop_write() */ 30#include <linux/mount.h> /* mnt_want_write_file(), mnt_drop_write() */
31#include <linux/buffer_head.h> 31#include <linux/buffer_head.h>
32#include <linux/nilfs2_fs.h> 32#include <linux/nilfs2_fs.h>
33#include "nilfs.h" 33#include "nilfs.h"
@@ -119,7 +119,7 @@ static int nilfs_ioctl_setflags(struct inode *inode, struct file *filp,
119 if (get_user(flags, (int __user *)argp)) 119 if (get_user(flags, (int __user *)argp))
120 return -EFAULT; 120 return -EFAULT;
121 121
122 ret = mnt_want_write(filp->f_path.mnt); 122 ret = mnt_want_write_file(filp);
123 if (ret) 123 if (ret)
124 return ret; 124 return ret;
125 125
@@ -174,7 +174,7 @@ static int nilfs_ioctl_change_cpmode(struct inode *inode, struct file *filp,
174 if (!capable(CAP_SYS_ADMIN)) 174 if (!capable(CAP_SYS_ADMIN))
175 return -EPERM; 175 return -EPERM;
176 176
177 ret = mnt_want_write(filp->f_path.mnt); 177 ret = mnt_want_write_file(filp);
178 if (ret) 178 if (ret)
179 return ret; 179 return ret;
180 180
@@ -210,7 +210,7 @@ nilfs_ioctl_delete_checkpoint(struct inode *inode, struct file *filp,
210 if (!capable(CAP_SYS_ADMIN)) 210 if (!capable(CAP_SYS_ADMIN))
211 return -EPERM; 211 return -EPERM;
212 212
213 ret = mnt_want_write(filp->f_path.mnt); 213 ret = mnt_want_write_file(filp);
214 if (ret) 214 if (ret)
215 return ret; 215 return ret;
216 216
@@ -591,7 +591,7 @@ static int nilfs_ioctl_clean_segments(struct inode *inode, struct file *filp,
591 if (!capable(CAP_SYS_ADMIN)) 591 if (!capable(CAP_SYS_ADMIN))
592 return -EPERM; 592 return -EPERM;
593 593
594 ret = mnt_want_write(filp->f_path.mnt); 594 ret = mnt_want_write_file(filp);
595 if (ret) 595 if (ret)
596 return ret; 596 return ret;
597 597
@@ -710,7 +710,7 @@ static int nilfs_ioctl_resize(struct inode *inode, struct file *filp,
710 if (!capable(CAP_SYS_ADMIN)) 710 if (!capable(CAP_SYS_ADMIN))
711 goto out; 711 goto out;
712 712
713 ret = mnt_want_write(filp->f_path.mnt); 713 ret = mnt_want_write_file(filp);
714 if (ret) 714 if (ret)
715 goto out; 715 goto out;
716 716
diff --git a/fs/ocfs2/ioctl.c b/fs/ocfs2/ioctl.c
index 726ff265b296..892ace253f97 100644
--- a/fs/ocfs2/ioctl.c
+++ b/fs/ocfs2/ioctl.c
@@ -906,7 +906,7 @@ long ocfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
906 if (get_user(flags, (int __user *) arg)) 906 if (get_user(flags, (int __user *) arg))
907 return -EFAULT; 907 return -EFAULT;
908 908
909 status = mnt_want_write(filp->f_path.mnt); 909 status = mnt_want_write_file(filp);
910 if (status) 910 if (status)
911 return status; 911 return status;
912 status = ocfs2_set_inode_attr(inode, flags, 912 status = ocfs2_set_inode_attr(inode, flags,
diff --git a/fs/ocfs2/move_extents.c b/fs/ocfs2/move_extents.c
index 184c76b8c293..1d3bf83f8b85 100644
--- a/fs/ocfs2/move_extents.c
+++ b/fs/ocfs2/move_extents.c
@@ -1059,7 +1059,7 @@ int ocfs2_ioctl_move_extents(struct file *filp, void __user *argp)
1059 struct ocfs2_move_extents range; 1059 struct ocfs2_move_extents range;
1060 struct ocfs2_move_extents_context *context = NULL; 1060 struct ocfs2_move_extents_context *context = NULL;
1061 1061
1062 status = mnt_want_write(filp->f_path.mnt); 1062 status = mnt_want_write_file(filp);
1063 if (status) 1063 if (status)
1064 return status; 1064 return status;
1065 1065
diff --git a/fs/reiserfs/ioctl.c b/fs/reiserfs/ioctl.c
index 4e153051bc75..0b94d7b2b11f 100644
--- a/fs/reiserfs/ioctl.c
+++ b/fs/reiserfs/ioctl.c
@@ -55,7 +55,7 @@ long reiserfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
55 break; 55 break;
56 } 56 }
57 57
58 err = mnt_want_write(filp->f_path.mnt); 58 err = mnt_want_write_file(filp);
59 if (err) 59 if (err)
60 break; 60 break;
61 61
@@ -107,7 +107,7 @@ setflags_out:
107 err = -EPERM; 107 err = -EPERM;
108 break; 108 break;
109 } 109 }
110 err = mnt_want_write(filp->f_path.mnt); 110 err = mnt_want_write_file(filp);
111 if (err) 111 if (err)
112 break; 112 break;
113 if (get_user(inode->i_generation, (int __user *)arg)) { 113 if (get_user(inode->i_generation, (int __user *)arg)) {
diff --git a/fs/ubifs/ioctl.c b/fs/ubifs/ioctl.c
index 548acf494afd..e52c84598feb 100644
--- a/fs/ubifs/ioctl.c
+++ b/fs/ubifs/ioctl.c
@@ -173,7 +173,7 @@ long ubifs_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
173 * Make sure the file-system is read-write and make sure it 173 * Make sure the file-system is read-write and make sure it
174 * will not become read-only while we are changing the flags. 174 * will not become read-only while we are changing the flags.
175 */ 175 */
176 err = mnt_want_write(file->f_path.mnt); 176 err = mnt_want_write_file(file);
177 if (err) 177 if (err)
178 return err; 178 return err;
179 dbg_gen("set flags: %#x, i_flags %#x", flags, inode->i_flags); 179 dbg_gen("set flags: %#x, i_flags %#x", flags, inode->i_flags);
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index d99a90518909..b436e17c753e 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -559,7 +559,7 @@ xfs_attrmulti_by_handle(
559 ops[i].am_flags); 559 ops[i].am_flags);
560 break; 560 break;
561 case ATTR_OP_SET: 561 case ATTR_OP_SET:
562 ops[i].am_error = mnt_want_write(parfilp->f_path.mnt); 562 ops[i].am_error = mnt_want_write_file(parfilp);
563 if (ops[i].am_error) 563 if (ops[i].am_error)
564 break; 564 break;
565 ops[i].am_error = xfs_attrmulti_attr_set( 565 ops[i].am_error = xfs_attrmulti_attr_set(
@@ -569,7 +569,7 @@ xfs_attrmulti_by_handle(
569 mnt_drop_write(parfilp->f_path.mnt); 569 mnt_drop_write(parfilp->f_path.mnt);
570 break; 570 break;
571 case ATTR_OP_REMOVE: 571 case ATTR_OP_REMOVE:
572 ops[i].am_error = mnt_want_write(parfilp->f_path.mnt); 572 ops[i].am_error = mnt_want_write_file(parfilp);
573 if (ops[i].am_error) 573 if (ops[i].am_error)
574 break; 574 break;
575 ops[i].am_error = xfs_attrmulti_attr_remove( 575 ops[i].am_error = xfs_attrmulti_attr_remove(
diff --git a/fs/xfs/xfs_ioctl32.c b/fs/xfs/xfs_ioctl32.c
index 54e623bfbb85..dd4ba1d4c582 100644
--- a/fs/xfs/xfs_ioctl32.c
+++ b/fs/xfs/xfs_ioctl32.c
@@ -454,7 +454,7 @@ xfs_compat_attrmulti_by_handle(
454 &ops[i].am_length, ops[i].am_flags); 454 &ops[i].am_length, ops[i].am_flags);
455 break; 455 break;
456 case ATTR_OP_SET: 456 case ATTR_OP_SET:
457 ops[i].am_error = mnt_want_write(parfilp->f_path.mnt); 457 ops[i].am_error = mnt_want_write_file(parfilp);
458 if (ops[i].am_error) 458 if (ops[i].am_error)
459 break; 459 break;
460 ops[i].am_error = xfs_attrmulti_attr_set( 460 ops[i].am_error = xfs_attrmulti_attr_set(
@@ -464,7 +464,7 @@ xfs_compat_attrmulti_by_handle(
464 mnt_drop_write(parfilp->f_path.mnt); 464 mnt_drop_write(parfilp->f_path.mnt);
465 break; 465 break;
466 case ATTR_OP_REMOVE: 466 case ATTR_OP_REMOVE:
467 ops[i].am_error = mnt_want_write(parfilp->f_path.mnt); 467 ops[i].am_error = mnt_want_write_file(parfilp);
468 if (ops[i].am_error) 468 if (ops[i].am_error)
469 break; 469 break;
470 ops[i].am_error = xfs_attrmulti_attr_remove( 470 ops[i].am_error = xfs_attrmulti_attr_remove(