Commit 4798d59e authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] knfsd: nfsd4: encode_dirent: trivial cleanup

Trim a couple redundant comments, minor whitespace cleanup.
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 133ed8cc
......@@ -1796,10 +1796,8 @@ nfsd4_encode_dirent_fattr(struct nfsd4_readdir *cd,
}
}
nfserr = nfsd4_encode_fattr(NULL, exp,
dentry, p, buflen, cd->rd_bmval,
cd->rd_rqstp);
nfserr = nfsd4_encode_fattr(NULL, exp, dentry, p, buflen, cd->rd_bmval,
cd->rd_rqstp);
out_put:
dput(dentry);
exp_put(exp);
......@@ -1850,9 +1848,6 @@ nfsd4_encode_dirent(struct readdir_cd *ccd, const char *name, int namlen,
p = xdr_encode_hyper(p, NFS_OFFSET_MAX); /* offset of next entry */
p = xdr_encode_array(p, name, namlen); /* name length & name */
/*
* Now we come to the ugly part: writing the fattr for this entry.
*/
nfserr = nfsd4_encode_dirent_fattr(cd, name, namlen, p, &buflen);
switch (nfserr) {
case nfs_ok:
......@@ -1865,9 +1860,7 @@ nfsd4_encode_dirent(struct readdir_cd *ccd, const char *name, int namlen,
goto fail;
default:
/*
* If we get here, we experienced a miscellaneous
* failure while writing the attributes. If the
* client requested the RDATTR_ERROR attribute,
* If the client requested the RDATTR_ERROR attribute,
* we stuff the error code into this attribute
* and continue. If this attribute was not requested,
* then in accordance with the spec, we fail the
......@@ -1880,12 +1873,10 @@ nfsd4_encode_dirent(struct readdir_cd *ccd, const char *name, int namlen,
if (p == NULL)
goto fail;
}
cd->buflen -= (p - cd->buffer);
cd->buffer = p;
cd->common.err = nfs_ok;
return 0;
fail:
cd->common.err = nfserr;
return -EINVAL;
......
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