Skip to content

Commit e4645cc

Browse files
sprasad-microsoftsmfrench
authored andcommitted
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>
1 parent c774e67 commit e4645cc

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/smb/client/smb2ops.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ smb2_add_credits(struct TCP_Server_Info *server,
9393
server->conn_id, server->hostname, *val,
9494
add, server->in_flight);
9595
}
96+
WARN_ON_ONCE(server->in_flight == 0);
9697
server->in_flight--;
9798
if (server->in_flight == 0 &&
9899
((optype & CIFS_OP_MASK) != CIFS_NEG_OP) &&

0 commit comments

Comments
 (0)