From: NeilBrown Trim a couple redundant comments, minor whitespace cleanup. Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton --- 25-akpm/fs/nfsd/nfs4xdr.c | 15 +++------------ 1 files changed, 3 insertions(+), 12 deletions(-) diff -puN fs/nfsd/nfs4xdr.c~knfsd-nfsd4-encode_dirent-trivial-cleanup fs/nfsd/nfs4xdr.c --- 25/fs/nfsd/nfs4xdr.c~knfsd-nfsd4-encode_dirent-trivial-cleanup 2004-11-15 22:07:42.834077232 -0800 +++ 25-akpm/fs/nfsd/nfs4xdr.c 2004-11-15 22:07:42.840076320 -0800 @@ -1796,10 +1796,8 @@ nfsd4_encode_dirent_fattr(struct nfsd4_r } } - - 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 *c 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 *c 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 *c 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; _