aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorNeil Brown <neilb@cse.unsw.edu.au>2005-01-04 05:46:37 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-04 05:46:37 -0800
commite6218d3988e758e98d0f179cd59f318b3fd1da11 (patch)
treec3d3da1a9fbaf1caf2224a5f592b809ae824052d /fs
parentb5d85ce8bf1e63fafe3c5cd252032059d63fbf5c (diff)
downloadhistory-e6218d3988e758e98d0f179cd59f318b3fd1da11.tar.gz
[PATCH] knfsd: nfsd4: encode_dirent: simplify nfs4_encode_dirent_fattr
Make nfsd4_encode_dirent_fattr() slightly more concise. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfs4xdr.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 412cfec2aed811..0c4846d004652a 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1778,10 +1778,8 @@ nfsd4_encode_dirent_fattr(struct nfsd4_readdir *cd,
int nfserr;
dentry = lookup_one_len(name, cd->rd_fhp->fh_dentry, namlen);
- if (IS_ERR(dentry)) {
- nfserr = nfserrno(PTR_ERR(dentry));
- return nfserr;
- }
+ if (IS_ERR(dentry))
+ return nfserrno(PTR_ERR(dentry));
exp_get(exp);
if (d_mountpoint(dentry)) {
@@ -1793,10 +1791,8 @@ nfsd4_encode_dirent_fattr(struct nfsd4_readdir *cd,
* options on exp. When the answer comes back,
* this call will be retried.
*/
- dput(dentry);
- exp_put(exp);
nfserr = nfserr_dropit;
- return nfserr;
+ goto out_put;
}
}
@@ -1804,6 +1800,7 @@ nfsd4_encode_dirent_fattr(struct nfsd4_readdir *cd,
nfserr = nfsd4_encode_fattr(NULL, exp,
dentry, p, buflen, cd->rd_bmval,
cd->rd_rqstp);
+out_put:
dput(dentry);
exp_put(exp);
return nfserr;