summaryrefslogtreecommitdiffstats
path: root/fs/cifs/smbdirect.h
diff options
context:
space:
mode:
authorLong Li <longli@microsoft.com>2020-03-30 11:04:07 -0700
committerSteve French <stfrench@microsoft.com>2020-04-07 12:41:16 -0500
commit3ffbe78aff93586d3e09e8af4501c563ab367c75 (patch)
treeb6450147a9a1092f6b445dcbde85dba5cba07b9d /fs/cifs/smbdirect.h
parent072a14ec6386829314ca96c725175ac1631360da (diff)
downloadlinux-stable-3ffbe78aff93586d3e09e8af4501c563ab367c75.tar.gz
linux-stable-3ffbe78aff93586d3e09e8af4501c563ab367c75.tar.bz2
linux-stable-3ffbe78aff93586d3e09e8af4501c563ab367c75.zip
cifs: smbd: Check send queue size before posting a send
Sometimes the remote peer may return more send credits than the send queue depth. If all the send credits are used to post senasd, we may overflow the send queue. Fix this by checking the send queue size before posting a send. Signed-off-by: Long Li <longli@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/smbdirect.h')
-rw-r--r--fs/cifs/smbdirect.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/smbdirect.h b/fs/cifs/smbdirect.h
index f70c7119a456..07c8f5638c39 100644
--- a/fs/cifs/smbdirect.h
+++ b/fs/cifs/smbdirect.h
@@ -114,6 +114,7 @@ struct smbd_connection {
/* Activity accoutning */
atomic_t send_pending;
wait_queue_head_t wait_send_pending;
+ wait_queue_head_t wait_post_send;
/* Receive queue */
struct list_head receive_queue;