Linux CIFS filesystem development
 help / color / mirror / Atom feed
* [PATCH] cifs: Fix TCP_Server_Info::credits to be signed
@ 2025-10-20  8:46 David Howells
  2025-10-20 13:32 ` Enzo Matsumiya
  0 siblings, 1 reply; 6+ messages in thread
From: David Howells @ 2025-10-20  8:46 UTC (permalink / raw)
  To: Steve French
  Cc: dhowells, Paulo Alcantara, linux-cifs, linux-fsdevel,
	linux-kernel

Fix TCP_Server_Info::credits to be signed, just as echo_credits and
oplock_credits are.  This also fixes what ought to get at least a
compilation warning if not an outright error in *get_credits_field() as a
pointer to the unsigned server->credits field is passed back as a pointer
to a signed int.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Steve French <sfrench@samba.org>
cc: Paulo Alcantara <pc@manguebit.org>
cc: linux-cifs@vger.kernel.org
---
 fs/smb/client/cifsglob.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h
index 8f6f567d7474..b91397dbb6aa 100644
--- a/fs/smb/client/cifsglob.h
+++ b/fs/smb/client/cifsglob.h
@@ -740,7 +740,7 @@ struct TCP_Server_Info {
 	bool nosharesock;
 	bool tcp_nodelay;
 	bool terminate;
-	unsigned int credits;  /* send no more requests at once */
+	int credits;  /* send no more requests at once */
 	unsigned int max_credits; /* can override large 32000 default at mnt */
 	unsigned int in_flight;  /* number of requests on the wire to server */
 	unsigned int max_in_flight; /* max number of requests that were on wire */


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-10-24 11:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-20  8:46 [PATCH] cifs: Fix TCP_Server_Info::credits to be signed David Howells
2025-10-20 13:32 ` Enzo Matsumiya
2025-10-20 14:08   ` David Howells
2025-10-20 14:45     ` Enzo Matsumiya
2025-10-20 16:58     ` Steve French
2025-10-24 11:56       ` Shyam Prasad N

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox