Commit e6218d39 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] knfsd: nfsd4: encode_dirent: simplify nfs4_encode_dirent_fattr

Make nfsd4_encode_dirent_fattr() slightly more concise.
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b5d85ce8
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment