aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShyam Prasad N <sprasad@microsoft.com>2023-06-09 17:46:56 +0000
committerSteve French <stfrench@microsoft.com>2023-06-14 10:15:05 -0500
commite4645cc2f1e2d6f268bb8dcfac40997c52432aed (patch)
treeacf10dd55206731cd2e0166c1dc346556cb59c57
parentc774e6779f38bf36f0cce65e30793704bab4b0d7 (diff)
downloadlinux-e4645cc2f1e2d6f268bb8dcfac40997c52432aed.tar.gz
cifs: add a warning when the in-flight count goes negative
We've seen the in-flight count go into negative with some internal stress testing in Microsoft. Adding a WARN when this happens, in hope of understanding why this happens when it happens. Signed-off-by: Shyam Prasad N <sprasad@microsoft.com> Reviewed-by: Bharath SM <bharathsm@microsoft.com> Signed-off-by: Steve French <stfrench@microsoft.com>
-rw-r--r--fs/smb/client/smb2ops.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c
index bbb19bbb14c9d5..a8bb9d00d33add 100644
--- a/fs/smb/client/smb2ops.c
+++ b/fs/smb/client/smb2ops.c
@@ -93,6 +93,7 @@ smb2_add_credits(struct TCP_Server_Info *server,
server->conn_id, server->hostname, *val,
add, server->in_flight);
}
+ WARN_ON_ONCE(server->in_flight == 0);
server->in_flight--;
if (server->in_flight == 0 &&
((optype & CIFS_OP_MASK) != CIFS_NEG_OP) &&