diff options
author | Fred Isaman <iisaman@citi.umich.edu> | 2006-01-19 01:43:40 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-19 03:20:27 (GMT) |
commit | 34081efc12aaaa12f20e5b59f3cb98ba6e27fb34 (patch) | |
tree | d3aaba6619f0fc3b5ad5d3bd1868bf196bb5d40c | |
parent | 6c26d08f02f829a833d393c3f1b196538a9ec2c4 (diff) | |
download | linux-fsl-qoriq-34081efc12aaaa12f20e5b59f3cb98ba6e27fb34.tar.xz |
[PATCH] 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 <iisaman@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 6b74332..69d3501 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -1764,10 +1764,11 @@ nfsd4_encode_dirent(struct readdir_cd *ccd, const char *name, int namlen, */ 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; |