diff options
author | Pavel Shilovsky <pshilov@microsoft.com> | 2019-01-04 03:45:27 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2019-01-11 16:14:40 +0300 |
commit | 8a26f0f781f56d3016b34a2217e346973d067e7b (patch) | |
tree | bde15d0af3ad8c84e5a539a4d5ed2dc28d3317fa /fs/cifs/cifsglob.h | |
parent | b9a74cde94957d82003fb9f7ab4777938ca851cd (diff) | |
download | linux-8a26f0f781f56d3016b34a2217e346973d067e7b.tar.xz |
CIFS: Fix credits calculation for cancelled requests
If a request is cancelled, we can't assume that the server returns
1 credit back. Instead we need to wait for a response and process
the number of credits granted by the server.
Create a separate mid callback for cancelled request, parse the number
of credits in a response buffer and add them to the client's credits.
If the didn't get a response (no response buffer available) assume
0 credits granted. The latter most probably happens together with
session reconnect, so the client's credits are adjusted anyway.
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r-- | fs/cifs/cifsglob.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 01ded7038b19..770926877b7c 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h @@ -1438,6 +1438,7 @@ struct mid_q_entry { int mid_state; /* wish this were enum but can not pass to wait_event */ unsigned int mid_flags; __le16 command; /* smb command code */ + unsigned int optype; /* operation type */ bool large_buf:1; /* if valid response, is pointer to large buf */ bool multiRsp:1; /* multiple trans2 responses for one request */ bool multiEnd:1; /* both received */ |