Commit 9b2ae623 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] kNFSd: Use correct value for max size for readlink response.

Symlinks in NFSv3 can be upto 1024 bytes, not 256 like nfsv2.
parent ba1dd456
...@@ -670,7 +670,7 @@ struct svc_procedure nfsd_procedures3[22] = { ...@@ -670,7 +670,7 @@ struct svc_procedure nfsd_procedures3[22] = {
PROC(setattr, sattr, wccstat, fhandle, RC_REPLBUFF, ST+WC), PROC(setattr, sattr, wccstat, fhandle, RC_REPLBUFF, ST+WC),
PROC(lookup, dirop, dirop, fhandle2, RC_NOCACHE, ST+FH+pAT+pAT), PROC(lookup, dirop, dirop, fhandle2, RC_NOCACHE, ST+FH+pAT+pAT),
PROC(access, access, access, fhandle, RC_NOCACHE, ST+pAT+1), PROC(access, access, access, fhandle, RC_NOCACHE, ST+pAT+1),
PROC(readlink, fhandle, readlink, fhandle, RC_NOCACHE, ST+pAT+1+256), PROC(readlink, fhandle, readlink, fhandle, RC_NOCACHE, ST+pAT+1+NFS3_MAXPATHLEN/4),
PROC(read, read, read, fhandle, RC_NOCACHE, ST+pAT+4+NFSSVC_MAXBLKSIZE), PROC(read, read, read, fhandle, RC_NOCACHE, ST+pAT+4+NFSSVC_MAXBLKSIZE),
PROC(write, write, write, fhandle, RC_REPLBUFF, ST+WC+4), PROC(write, write, write, fhandle, RC_REPLBUFF, ST+WC+4),
PROC(create, create, create, fhandle2, RC_REPLBUFF, ST+(1+FH+pAT)+WC), PROC(create, create, create, fhandle2, RC_REPLBUFF, ST+(1+FH+pAT)+WC),
......
...@@ -545,7 +545,7 @@ struct svc_procedure nfsd_procedures2[18] = { ...@@ -545,7 +545,7 @@ struct svc_procedure nfsd_procedures2[18] = {
PROC(setattr, sattrargs, attrstat, fhandle, RC_REPLBUFF, ST+AT), PROC(setattr, sattrargs, attrstat, fhandle, RC_REPLBUFF, ST+AT),
PROC(none, void, void, none, RC_NOCACHE, ST), PROC(none, void, void, none, RC_NOCACHE, ST),
PROC(lookup, diropargs, diropres, fhandle, RC_NOCACHE, ST+FH+AT), PROC(lookup, diropargs, diropres, fhandle, RC_NOCACHE, ST+FH+AT),
PROC(readlink, fhandle, readlinkres, none, RC_NOCACHE, ST+1+256), PROC(readlink, fhandle, 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),
PROC(none, void, void, none, RC_NOCACHE, ST), PROC(none, void, void, none, RC_NOCACHE, ST),
PROC(write, writeargs, attrstat, fhandle, RC_REPLBUFF, ST+AT), PROC(write, writeargs, attrstat, fhandle, RC_REPLBUFF, ST+AT),
......
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