2006-01-13 01:01:12

by NeilBrown

[permalink] [raw]
Subject: [PATCH kNFSd 021 of 26] nfsd4: Fix bug in rdattr_error return


Fix bug in rdattr_error return which causes correct error code
to be overwritten by nfserr_toosmall.

Signed-off-by: Fred Isaman <[email protected]>
Signed-off-by: Neil Brown <[email protected]>

### Diffstat output
./fs/nfsd/nfs4xdr.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff ./fs/nfsd/nfs4xdr.c~current~ ./fs/nfsd/nfs4xdr.c
--- ./fs/nfsd/nfs4xdr.c~current~ 2006-01-13 11:51:05.000000000 +1100
+++ ./fs/nfsd/nfs4xdr.c 2006-01-13 11:51:09.000000000 +1100
@@ -1764,10 +1764,11 @@ nfsd4_encode_dirent(struct readdir_cd *c
*/
if (!(cd->rd_bmval[0] & FATTR4_WORD0_RDATTR_ERROR))
goto fail;
- nfserr = nfserr_toosmall;
p = nfsd4_encode_rdattr_error(p, buflen, nfserr);
- if (p == NULL)
+ if (p == NULL) {
+ nfserr = nfserr_toosmall;
goto fail;
+ }
}
cd->buflen -= (p - cd->buffer);
cd->buffer = p;


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs