diff options
| author | Neil Brown <neilb@cse.unsw.edu.au> | 2005-01-04 05:47:42 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-04 05:47:42 -0800 |
| commit | 4798d59e2391e5bd66e3af6be4ba5c22fbccbf3d (patch) | |
| tree | 112d08a6d61f9c13b76a2b542774c906bef9662e | |
| parent | 133ed8cc4a27a342738afd486670a1d6cff4d5a5 (diff) | |
[PATCH] knfsd: nfsd4: encode_dirent: trivial cleanup
Trim a couple redundant comments, minor whitespace cleanup.
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>
| -rw-r--r-- | fs/nfsd/nfs4xdr.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index dd4355cc9e6a..1396eb41c5a7 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -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; |
