diff options
author | Pavel Shilovsky <piastry@etersoft.ru> | 2012-03-20 13:55:09 +0400 |
---|---|---|
committer | Steve French <stevef@smf-gateway.(none)> | 2012-03-20 19:17:40 +0400 |
commit | 10b9b98e41ba248a899f6175ce96ee91431b6194 (patch) | |
tree | 8734af1f3e16d1836b2ce16f848828d4ac200f5f /fs/cifs/transport.c | |
parent | ce85852b90a214cf577fc1b4f49d99fd7e98784a (diff) | |
download | linux-10b9b98e41ba248a899f6175ce96ee91431b6194.tar.xz |
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/transport.c')
-rw-r--r-- | fs/cifs/transport.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 0cc9584f5889..99a27cfa6cd2 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -265,12 +265,12 @@ static int wait_for_free_request(struct TCP_Server_Info *server, spin_lock(&GlobalMid_Lock); while (1) { - if (atomic_read(&server->inFlight) >= cifs_max_pending) { + if (atomic_read(&server->inFlight) >= server->maxReq) { spin_unlock(&GlobalMid_Lock); cifs_num_waiters_inc(server); wait_event(server->request_q, atomic_read(&server->inFlight) - < cifs_max_pending); + < server->maxReq); cifs_num_waiters_dec(server); spin_lock(&GlobalMid_Lock); } else { |