From: Stefan Metzmacher Date: Fri, 17 Oct 2025 18:33:10 +0000 (+0200) Subject: smb: client: change smbd_post_send_empty() to void return X-Git-Tag: v7.1-rc1~128^2~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15c7e492610f001e1ff6480c6b5d9d1653afaa3c;p=thirdparty%2Fkernel%2Flinux.git smb: client: change smbd_post_send_empty() to void return The caller doesn't check, so we better call smbdirect_socket_schedule_cleanup() to handle the error. Cc: Steve French Cc: Tom Talpey Cc: Long Li Cc: Namjae Jeon Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Stefan Metzmacher Acked-by: Namjae Jeon Signed-off-by: Steve French --- diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c index 2464e0617eec3..4ff593ccb3716 100644 --- a/fs/smb/client/smbdirect.c +++ b/fs/smb/client/smbdirect.c @@ -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,