aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorNeil Brown <neilb@cse.unsw.edu.au>2005-01-04 05:46:12 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-04 05:46:12 -0800
commitee7bf1c3b3ce59abf7f3525eb26ad28970f1612f (patch)
tree0efabf1719f7934b2b9b473d00f8b917858c5fd2 /fs
parentee9eabb56ef9d855d83ab23195cfca635734b2e7 (diff)
downloadhistory-ee7bf1c3b3ce59abf7f3525eb26ad28970f1612f.tar.gz
[PATCH] knfsd: nfsd4: encode_dirent: superfluous local variables
The local variables bmval0 and bmval1 turn out not to really help much. 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.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 9b4b329125ad55..f06899b61792cb 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1779,7 +1779,6 @@ nfsd4_encode_dirent(struct readdir_cd *ccd, const char *name, int namlen,
u32 *attrlenp;
struct dentry *dentry;
struct svc_export *exp = cd->rd_fhp->fh_export;
- u32 bmval0, bmval1;
int nfserr = 0;
/* In nfsv4, "." and ".." never make it onto the wire.. */
@@ -1803,9 +1802,6 @@ nfsd4_encode_dirent(struct readdir_cd *ccd, const char *name, int namlen,
/*
* Now we come to the ugly part: writing the fattr for this entry.
*/
- bmval0 = cd->rd_bmval[0];
- bmval1 = cd->rd_bmval[1];
-
dentry = lookup_one_len(name, cd->rd_fhp->fh_dentry, namlen);
if (IS_ERR(dentry)) {
nfserr = nfserrno(PTR_ERR(dentry));
@@ -1852,19 +1848,16 @@ error:
* then in accordance with the spec, we fail the
* entire READDIR operation(!)
*/
- if (!(bmval0 & FATTR4_WORD0_RDATTR_ERROR)) {
+ if (!(cd->rd_bmval[0] & FATTR4_WORD0_RDATTR_ERROR)) {
cd->common.err = nfserr;
return -EINVAL;
}
- bmval0 = FATTR4_WORD0_RDATTR_ERROR;
- bmval1 = 0;
-
if (buflen < 6)
goto nospc;
*p++ = htonl(2);
- *p++ = htonl(bmval0);
- *p++ = htonl(bmval1);
+ *p++ = htonl(FATTR4_WORD0_RDATTR_ERROR); /* bmval0 */
+ *p++ = htonl(0); /* bmval1 */
attrlenp = p++;
*p++ = nfserr; /* no htonl */