aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
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/nfsd
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/nfsd')
-rw-r--r--fs/nfsd/nfs4recover.c6
1 files changed, 3 insertions, 3 deletions
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);