]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
smb: client: change smbd_post_send_empty() to void return
authorStefan Metzmacher <metze@samba.org>
Fri, 17 Oct 2025 18:33:10 +0000 (20:33 +0200)
committerSteve French <stfrench@microsoft.com>
Thu, 16 Apr 2026 02:58:22 +0000 (21:58 -0500)
The caller doesn't check, so we better call
smbdirect_socket_schedule_cleanup() to handle the error.

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Cc: Namjae Jeon <linkinjeon@kernel.org>
Cc: linux-cifs@vger.kernel.org
Cc: samba-technical@lists.samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/smbdirect.c

index 2464e0617eec39f7e5c944dfe971d90912b9c766..4ff593ccb3716d709b8ce5c0ae02de185011bd0c 100644 (file)
@@ -27,8 +27,6 @@ static int smbd_post_send(struct smbdirect_socket *sc,
                          struct smbdirect_send_batch *batch,
                          struct smbdirect_send_io *request);
 
-static int smbd_post_send_empty(struct smbdirect_socket *sc);
-
 /* Port numbers for SMBD transport */
 #define SMB_PORT       445
 #define SMBD_PORT      5445
@@ -1144,12 +1142,17 @@ err_wait_bcredit:
  * Empty message is used to extend credits to peer to for keep live
  * while there is no upper layer payload to send at the time
  */
-static int smbd_post_send_empty(struct smbdirect_socket *sc)
+static void smbd_post_send_empty(struct smbdirect_socket *sc)
 {
        int remaining_data_length = 0;
+       int ret;
 
        sc->statistics.send_empty++;
-       return smbd_post_send_iter(sc, NULL, NULL, &remaining_data_length);
+       ret = smbd_post_send_iter(sc, NULL, NULL, &remaining_data_length);
+       if (ret < 0) {
+               log_rdma_send(ERR, "smbd_post_send_iter failed ret=%d\n", ret);
+               smbdirect_socket_schedule_cleanup(sc, ret);
+       }
 }
 
 static int smbd_post_send_full_iter(struct smbdirect_socket *sc,