summaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorJan Blunck <jblunck@suse.de>2008-02-14 19:34:35 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-14 21:13:33 -0800
commit1d957f9bf87da74f420424d16ece005202bbebd3 (patch)
tree363d4770c0c74a536524c99ccd2762ce96ee9bbe /fs/nfsd
parent4ac9137858e08a19f29feac4e1f4df7c268b0ba5 (diff)
downloadblackbird-op-linux-1d957f9bf87da74f420424d16ece005202bbebd3.tar.gz
blackbird-op-linux-1d957f9bf87da74f420424d16ece005202bbebd3.zip
Introduce path_put()
* Add path_put() functions for releasing a reference to the dentry and vfsmount of a struct path in the right order * Switch from path_release(nd) to path_put(&nd->path) * Rename dput_path() to path_put_conditional() [akpm@linux-foundation.org: fix cifs] Signed-off-by: Jan Blunck <jblunck@suse.de> Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Acked-by: Christoph Hellwig <hch@lst.de> Cc: <linux-fsdevel@vger.kernel.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Steven French <sfrench@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/export.c10
-rw-r--r--fs/nfsd/nfs4recover.c2
-rw-r--r--fs/nfsd/nfs4state.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 2ac0e30285c2..717413f07e9a 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -177,7 +177,7 @@ static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen)
cache_put(&ek->h, &svc_expkey_cache);
else
err = -ENOMEM;
- path_release(&nd);
+ path_put(&nd.path);
}
cache_flush();
out:
@@ -630,7 +630,7 @@ static int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen)
kfree(exp.ex_uuid);
kfree(exp.ex_path);
if (nd.path.dentry)
- path_release(&nd);
+ path_put(&nd.path);
out_no_path:
if (dom)
auth_domain_put(dom);
@@ -1098,7 +1098,7 @@ finish:
cache_put(&fsid_key->h, &svc_expkey_cache);
if (clp)
auth_domain_put(clp);
- path_release(&nd);
+ path_put(&nd.path);
out_unlock:
exp_writeunlock();
out:
@@ -1150,7 +1150,7 @@ exp_unexport(struct nfsctl_export *nxp)
err = -EINVAL;
exp = exp_get_by_name(dom, nd.path.mnt, nd.path.dentry, NULL);
- path_release(&nd);
+ path_put(&nd.path);
if (IS_ERR(exp))
goto out_domain;
@@ -1209,7 +1209,7 @@ exp_rootfh(svc_client *clp, char *path, struct knfsd_fh *f, int maxsize)
fh_put(&fh);
exp_put(exp);
out:
- path_release(&nd);
+ path_put(&nd.path);
return err;
}
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
index a7a8fdf86ea7..1ff90625860f 100644
--- a/fs/nfsd/nfs4recover.c
+++ b/fs/nfsd/nfs4recover.c
@@ -415,5 +415,5 @@ nfsd4_shutdown_recdir(void)
if (!rec_dir_init)
return;
rec_dir_init = 0;
- path_release(&rec_dir);
+ path_put(&rec_dir.path);
}
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index be2b9ecd230a..bcb97d8e8b8b 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -3265,7 +3265,7 @@ nfs4_reset_recoverydir(char *recdir)
nfs4_set_recdir(recdir);
status = 0;
}
- path_release(&nd);
+ path_put(&nd.path);
return status;
}
OpenPOWER on IntegriCloud