Commit e4645cc2 authored by Shyam Prasad N's avatar Shyam Prasad N Committed by Steve French

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: default avatarShyam Prasad N <sprasad@microsoft.com>
Reviewed-by: default avatarBharath SM <bharathsm@microsoft.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent c774e677
...@@ -93,6 +93,7 @@ smb2_add_credits(struct TCP_Server_Info *server, ...@@ -93,6 +93,7 @@ smb2_add_credits(struct TCP_Server_Info *server,
server->conn_id, server->hostname, *val, server->conn_id, server->hostname, *val,
add, server->in_flight); add, server->in_flight);
} }
WARN_ON_ONCE(server->in_flight == 0);
server->in_flight--; server->in_flight--;
if (server->in_flight == 0 && if (server->in_flight == 0 &&
((optype & CIFS_OP_MASK) != CIFS_NEG_OP) && ((optype & CIFS_OP_MASK) != CIFS_NEG_OP) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment