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