Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 107f5cad authored by Shyam Prasad N's avatar Shyam Prasad N Committed by Greg Kroah-Hartman
Browse files

cifs: add a warning when the in-flight count goes negative



[ Upstream commit e4645cc2f1e2d6f268bb8dcfac40997c52432aed ]

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>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent f31618e4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ smb2_add_credits(struct TCP_Server_Info *server,
		*val = 65000; /* Don't get near 64K credits, avoid srv bugs */
		printk_once(KERN_WARNING "server overflowed SMB3 credits\n");
	}
	WARN_ON_ONCE(server->in_flight == 0);
	server->in_flight--;
	if (server->in_flight == 0 && (optype & CIFS_OP_MASK) != CIFS_NEG_OP)
		rc = change_conf(server);