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>
This commit is contained in:
@@ -147,7 +147,7 @@ nfsd4_create_clid_dir(struct nfs4_client *clp)
|
||||
status = -EEXIST;
|
||||
if (dentry->d_inode)
|
||||
goto out_put;
|
||||
status = mnt_want_write(rec_file->f_path.mnt);
|
||||
status = mnt_want_write_file(rec_file);
|
||||
if (status)
|
||||
goto out_put;
|
||||
status = vfs_mkdir(dir->d_inode, dentry, S_IRWXU);
|
||||
@@ -268,7 +268,7 @@ nfsd4_remove_clid_dir(struct nfs4_client *clp)
|
||||
if (!rec_file || !clp->cl_firststate)
|
||||
return;
|
||||
|
||||
status = mnt_want_write(rec_file->f_path.mnt);
|
||||
status = mnt_want_write_file(rec_file);
|
||||
if (status)
|
||||
goto out;
|
||||
clp->cl_firststate = 0;
|
||||
@@ -311,7 +311,7 @@ nfsd4_recdir_purge_old(void) {
|
||||
|
||||
if (!rec_file)
|
||||
return;
|
||||
status = mnt_want_write(rec_file->f_path.mnt);
|
||||
status = mnt_want_write_file(rec_file);
|
||||
if (status)
|
||||
goto out;
|
||||
status = nfsd4_list_rec_dir(purge_old);
|
||||
|
Reference in New Issue
Block a user