diff options
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r-- | fs/cifs/cifssmb.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index d7cbcfa21a0c..70aac35c398f 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -461,7 +461,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifs_ses *ses) | |||
461 | server->maxReq = min_t(unsigned int, | 461 | server->maxReq = min_t(unsigned int, |
462 | le16_to_cpu(rsp->MaxMpxCount), | 462 | le16_to_cpu(rsp->MaxMpxCount), |
463 | cifs_max_pending); | 463 | cifs_max_pending); |
464 | server->oplocks = server->maxReq > 1 ? enable_oplocks : false; | 464 | cifs_set_credits(server, server->maxReq); |
465 | server->maxBuf = le16_to_cpu(rsp->MaxBufSize); | 465 | server->maxBuf = le16_to_cpu(rsp->MaxBufSize); |
466 | server->max_vcs = le16_to_cpu(rsp->MaxNumberVcs); | 466 | server->max_vcs = le16_to_cpu(rsp->MaxNumberVcs); |
467 | /* even though we do not use raw we might as well set this | 467 | /* even though we do not use raw we might as well set this |
@@ -569,7 +569,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifs_ses *ses) | |||
569 | little endian */ | 569 | little endian */ |
570 | server->maxReq = min_t(unsigned int, le16_to_cpu(pSMBr->MaxMpxCount), | 570 | server->maxReq = min_t(unsigned int, le16_to_cpu(pSMBr->MaxMpxCount), |
571 | cifs_max_pending); | 571 | cifs_max_pending); |
572 | server->oplocks = server->maxReq > 1 ? enable_oplocks : false; | 572 | cifs_set_credits(server, server->maxReq); |
573 | /* probably no need to store and check maxvcs */ | 573 | /* probably no need to store and check maxvcs */ |
574 | server->maxBuf = le32_to_cpu(pSMBr->MaxBufferSize); | 574 | server->maxBuf = le32_to_cpu(pSMBr->MaxBufferSize); |
575 | server->max_rw = le32_to_cpu(pSMBr->MaxRawSize); | 575 | server->max_rw = le32_to_cpu(pSMBr->MaxRawSize); |
@@ -721,8 +721,7 @@ cifs_echo_callback(struct mid_q_entry *mid) | |||
721 | struct TCP_Server_Info *server = mid->callback_data; | 721 | struct TCP_Server_Info *server = mid->callback_data; |
722 | 722 | ||
723 | DeleteMidQEntry(mid); | 723 | DeleteMidQEntry(mid); |
724 | dec_in_flight(server); | 724 | cifs_add_credits(server, 1); |
725 | wake_up(&server->request_q); | ||
726 | } | 725 | } |
727 | 726 | ||
728 | int | 727 | int |
@@ -1674,8 +1673,7 @@ cifs_readv_callback(struct mid_q_entry *mid) | |||
1674 | 1673 | ||
1675 | queue_work(system_nrt_wq, &rdata->work); | 1674 | queue_work(system_nrt_wq, &rdata->work); |
1676 | DeleteMidQEntry(mid); | 1675 | DeleteMidQEntry(mid); |
1677 | dec_in_flight(server); | 1676 | cifs_add_credits(server, 1); |
1678 | wake_up(&server->request_q); | ||
1679 | } | 1677 | } |
1680 | 1678 | ||
1681 | /* cifs_async_readv - send an async write, and set up mid to handle result */ | 1679 | /* cifs_async_readv - send an async write, and set up mid to handle result */ |
@@ -2115,8 +2113,7 @@ cifs_writev_callback(struct mid_q_entry *mid) | |||
2115 | 2113 | ||
2116 | queue_work(system_nrt_wq, &wdata->work); | 2114 | queue_work(system_nrt_wq, &wdata->work); |
2117 | DeleteMidQEntry(mid); | 2115 | DeleteMidQEntry(mid); |
2118 | dec_in_flight(tcon->ses->server); | 2116 | cifs_add_credits(tcon->ses->server, 1); |
2119 | wake_up(&tcon->ses->server->request_q); | ||
2120 | } | 2117 | } |
2121 | 2118 | ||
2122 | /* cifs_async_writev - send an async write, and set up mid to handle result */ | 2119 | /* cifs_async_writev - send an async write, and set up mid to handle result */ |