
From: NeilBrown <neilb@cse.unsw.edu.au>

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>
---

 25-akpm/fs/nfsd/nfs4xdr.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff -puN fs/nfsd/nfs4xdr.c~knfsd-nfsd4-encode_dirent-simplify-nfs4_encode_dirent_fattr fs/nfsd/nfs4xdr.c
--- 25/fs/nfsd/nfs4xdr.c~knfsd-nfsd4-encode_dirent-simplify-nfs4_encode_dirent_fattr	2004-11-15 22:07:21.829270448 -0800
+++ 25-akpm/fs/nfsd/nfs4xdr.c	2004-11-15 22:07:21.836269384 -0800
@@ -1778,10 +1778,8 @@ nfsd4_encode_dirent_fattr(struct nfsd4_r
 	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_r
 		 * 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_r
 	nfserr = nfsd4_encode_fattr(NULL, exp,
 			dentry, p, buflen, cd->rd_bmval,
 			cd->rd_rqstp);
+out_put:
 	dput(dentry);
 	exp_put(exp);
 	return nfserr;
_
