[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <vmbhu5djhw2fovzwpa6dptuthwocmjc5oh6vsi4aolodstmqix@4jv64tzfe3qp>
Date: Mon, 20 Oct 2025 10:32:19 -0300
From: Enzo Matsumiya <ematsumiya@...e.de>
To: David Howells <dhowells@...hat.com>
Cc: Steve French <sfrench@...ba.org>, Paulo Alcantara <pc@...guebit.org>,
linux-cifs@...r.kernel.org, linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cifs: Fix TCP_Server_Info::credits to be signed
Hi David,
On 10/20, David Howells wrote:
>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.
Both semantically and technically, credits shouldn't go negative.
Shouldn't those other fields/functions become unsigned instead?
Cheers,
Enzo
>Signed-off-by: David Howells <dhowells@...hat.com>
>cc: Steve French <sfrench@...ba.org>
>cc: Paulo Alcantara <pc@...guebit.org>
>cc: linux-cifs@...r.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 */
>
>
Powered by blists - more mailing lists