aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb2misc.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2019-02-04 14:53:42 -0700
committerJason Gunthorpe <jgg@mellanox.com>2019-02-04 14:53:42 -0700
commit6a8a2aa62da2fbe51f5449993fd366398048f465 (patch)
tree566c6fcc782eefbca054af8553371d09b9d0734c /fs/cifs/smb2misc.c
parentIB/core: Remove ib_sg_dma_address() and ib_sg_dma_len() (diff)
parentLinux 5.0-rc5 (diff)
downloadlinux-dev-6a8a2aa62da2fbe51f5449993fd366398048f465.tar.xz
linux-dev-6a8a2aa62da2fbe51f5449993fd366398048f465.zip
Merge tag 'v5.0-rc5' into rdma.git for-next
Linux 5.0-rc5 Needed to merge the include/uapi changes so we have an up to date single-tree for these files. Patches already posted are also expected to need this for dependencies.
Diffstat (limited to 'fs/cifs/smb2misc.c')
-rw-r--r--fs/cifs/smb2misc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c
index 6a9c47541c53..7b8b58fb4d3f 100644
--- a/fs/cifs/smb2misc.c
+++ b/fs/cifs/smb2misc.c
@@ -648,6 +648,13 @@ smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server)
if (rsp->sync_hdr.Command != SMB2_OPLOCK_BREAK)
return false;
+ if (rsp->sync_hdr.CreditRequest) {
+ spin_lock(&server->req_lock);
+ server->credits += le16_to_cpu(rsp->sync_hdr.CreditRequest);
+ spin_unlock(&server->req_lock);
+ wake_up(&server->request_q);
+ }
+
if (rsp->StructureSize !=
smb2_rsp_struct_sizes[SMB2_OPLOCK_BREAK_HE]) {
if (le16_to_cpu(rsp->StructureSize) == 44)