summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
authorPavel Shilovsky <piastry@etersoft.ru>2012-03-20 05:55:09 -0400
committerSteve French <stevef@smf-gateway.(none)>2012-03-20 11:17:40 -0400
commit10b9b98e41ba248a899f6175ce96ee91431b6194 (patch)
tree8734af1f3e16d1836b2ce16f848828d4ac200f5f /fs/cifs/cifsfs.c
parentce85852b90a214cf577fc1b4f49d99fd7e98784a (diff)
CIFS: Respect negotiated MaxMpxCount
Some servers sets this value less than 50 that was hardcoded and we lost the connection if when we exceed this limit. Fix this by respecting this value - not sending more than the server allows. Cc: stable@kernel.org Reviewed-by: Jeff Layton <jlayton@samba.org> Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <stevef@smf-gateway.(none)>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r--fs/cifs/cifsfs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index b1fd382d1952..6ee1cb45ca0d 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -76,7 +76,7 @@ MODULE_PARM_DESC(cifs_min_small, "Small network buffers in pool. Default: 30 "
76unsigned int cifs_max_pending = CIFS_MAX_REQ; 76unsigned int cifs_max_pending = CIFS_MAX_REQ;
77module_param(cifs_max_pending, int, 0444); 77module_param(cifs_max_pending, int, 0444);
78MODULE_PARM_DESC(cifs_max_pending, "Simultaneous requests to server. " 78MODULE_PARM_DESC(cifs_max_pending, "Simultaneous requests to server. "
79 "Default: 50 Range: 2 to 256"); 79 "Default: 32767 Range: 2 to 32767.");
80unsigned short echo_retries = 5; 80unsigned short echo_retries = 5;
81module_param(echo_retries, ushort, 0644); 81module_param(echo_retries, ushort, 0644);
82MODULE_PARM_DESC(echo_retries, "Number of echo attempts before giving up and " 82MODULE_PARM_DESC(echo_retries, "Number of echo attempts before giving up and "
@@ -1116,9 +1116,9 @@ init_cifs(void)
1116 if (cifs_max_pending < 2) { 1116 if (cifs_max_pending < 2) {
1117 cifs_max_pending = 2; 1117 cifs_max_pending = 2;
1118 cFYI(1, "cifs_max_pending set to min of 2"); 1118 cFYI(1, "cifs_max_pending set to min of 2");
1119 } else if (cifs_max_pending > 256) { 1119 } else if (cifs_max_pending > CIFS_MAX_REQ) {
1120 cifs_max_pending = 256; 1120 cifs_max_pending = CIFS_MAX_REQ;
1121 cFYI(1, "cifs_max_pending set to max of 256"); 1121 cFYI(1, "cifs_max_pending set to max of %u", CIFS_MAX_REQ);
1122 } 1122 }
1123 1123
1124 rc = cifs_fscache_register(); 1124 rc = cifs_fscache_register();