[PATCH] knfsd: Correct reserved reply space for read requests.
NFSd makes sure there is enough space to hold the maximum possible reply before accepting a request. The units for this maximum is (4byte) words. However in three places, particularly for read request, the number given is a number of bytes. This means too much space is reserved which is slightly wasteful. This is the sort of patch that could uncover a deeper bug, and it is not critical, so it would be best for it to spend a while in -mm before going in to mainline. (akpm: target 2.6.17-rc2, 2.6.16.3 (approx)) Discovered-by: "Eivind Sarto" <ivan@kasenna.com> Signed-off-by: Neil Brown <neilb@suse.de> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:

committed by
Linus Torvalds

parent
df2487cff5
commit
7775f4c85d
@@ -553,7 +553,7 @@ static struct svc_procedure nfsd_procedures2[18] = {
|
||||
PROC(none, void, void, none, RC_NOCACHE, ST),
|
||||
PROC(lookup, diropargs, diropres, fhandle, RC_NOCACHE, ST+FH+AT),
|
||||
PROC(readlink, readlinkargs, readlinkres, none, RC_NOCACHE, ST+1+NFS_MAXPATHLEN/4),
|
||||
PROC(read, readargs, readres, fhandle, RC_NOCACHE, ST+AT+1+NFSSVC_MAXBLKSIZE),
|
||||
PROC(read, readargs, readres, fhandle, RC_NOCACHE, ST+AT+1+NFSSVC_MAXBLKSIZE/4),
|
||||
PROC(none, void, void, none, RC_NOCACHE, ST),
|
||||
PROC(write, writeargs, attrstat, fhandle, RC_REPLBUFF, ST+AT),
|
||||
PROC(create, createargs, diropres, fhandle, RC_REPLBUFF, ST+FH+AT),
|
||||
|
Reference in New Issue
Block a user