Commit 83c28cf0 authored by Steve French's avatar Steve French Committed by Steve French

[CIFS] Fix path based calls to consistently allow up to PATH_MAX (some were

incorrectly limited to just over 512)

Pointed out by Shaggy.

Signed-off-by: Steve French (sfrench@us.ibm.com)
parent 071d001e
......@@ -6,6 +6,8 @@ when mounting with the directio mount option. Fix oops after
returning from mount when experimental ExtendedSecurity enabled and
SpnegoNegotiated returning invalid error. Fix case to retry better when
peek returns from 1 to 3 bytes on socket which should have more data.
Fixed path based calls (such as cifs lookup) to handle path names
longer than 530 (now can handle PATH_MAX).
Version 1.27
------------
......
......@@ -60,7 +60,7 @@ unsigned int sign_CIFS_PDUs = 1;
struct task_struct * oplockThread = NULL;
unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE;
module_param(CIFSMaxBufSize, int, CIFS_MAX_MSGSIZE);
MODULE_PARM_DESC(CIFSMaxBufSize,"Network buffer size (not including header). Default: 16384 Range: 4096 to 130048");
MODULE_PARM_DESC(CIFSMaxBufSize,"Network buffer size (not including header). Default: 16384 Range: 8192 to 130048");
unsigned int cifs_min_rcv = CIFS_MIN_RCV_POOL;
module_param(cifs_min_rcv, int, CIFS_MIN_RCV_POOL);
MODULE_PARM_DESC(cifs_min_rcv,"Network buffers in pool. Default: 4 Range: 1 to 64");
......@@ -632,8 +632,10 @@ cifs_destroy_inodecache(void)
static int
cifs_init_request_bufs(void)
{
if(CIFSMaxBufSize < 4096) {
CIFSMaxBufSize = 4096;
if(CIFSMaxBufSize < 8192) {
/* Buffer size can not be smaller than 2 * PATH_MAX since maximum
Unicode path name has to fit in any SMB/CIFS path based frames */
CIFSMaxBufSize = 8192;
} else if (CIFSMaxBufSize > 1024*127) {
CIFSMaxBufSize = 1024 * 127;
} else {
......
This diff is collapsed.
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