mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
[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>
This commit is contained in:
parent
6c26d08f02
commit
34081efc12
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user