diff options
-rw-r--r-- | fs/cifs/transport.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index e5202ddef2fb..58b31da17fc5 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c | |||
@@ -257,6 +257,8 @@ smb_send(struct TCP_Server_Info *server, struct smb_hdr *smb_buffer, | |||
257 | static int | 257 | static int |
258 | wait_for_free_request(struct TCP_Server_Info *server, const int long_op) | 258 | wait_for_free_request(struct TCP_Server_Info *server, const int long_op) |
259 | { | 259 | { |
260 | int rc; | ||
261 | |||
260 | spin_lock(&server->req_lock); | 262 | spin_lock(&server->req_lock); |
261 | 263 | ||
262 | if (long_op == CIFS_ASYNC_OP) { | 264 | if (long_op == CIFS_ASYNC_OP) { |
@@ -271,8 +273,11 @@ wait_for_free_request(struct TCP_Server_Info *server, const int long_op) | |||
271 | if (server->credits <= 0) { | 273 | if (server->credits <= 0) { |
272 | spin_unlock(&server->req_lock); | 274 | spin_unlock(&server->req_lock); |
273 | cifs_num_waiters_inc(server); | 275 | cifs_num_waiters_inc(server); |
274 | wait_event(server->request_q, has_credits(server)); | 276 | rc = wait_event_killable(server->request_q, |
277 | has_credits(server)); | ||
275 | cifs_num_waiters_dec(server); | 278 | cifs_num_waiters_dec(server); |
279 | if (rc) | ||
280 | return rc; | ||
276 | spin_lock(&server->req_lock); | 281 | spin_lock(&server->req_lock); |
277 | } else { | 282 | } else { |
278 | if (server->tcpStatus == CifsExiting) { | 283 | if (server->tcpStatus == CifsExiting) { |