From: Stefan Metzmacher Date: Tue, 2 Sep 2025 10:49:44 +0000 (+0200) Subject: smb: client: make use of smbdirect_socket_wake_up_all() X-Git-Tag: v7.1-rc1~128^2~81 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5f6e338bbb78787933ffcf87959178c4f0a08757;p=thirdparty%2Flinux.git smb: client: make use of smbdirect_socket_wake_up_all() This is a superset of smbd_disconnect_wake_up_all() and calling wake_up_all(&sc->rw_io.credits.wait_queue); in addition should not matter as it's not used on the client anyway. 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 1d285d364a72b..69ff1128e8f0c 100644 --- a/fs/smb/client/smbdirect.c +++ b/fs/smb/client/smbdirect.c @@ -235,22 +235,6 @@ do { \ #define log_rdma_mr(level, fmt, args...) \ log_rdma(level, LOG_RDMA_MR, fmt, ##args) -static void smbd_disconnect_wake_up_all(struct smbdirect_socket *sc) -{ - /* - * Wake up all waiters in all wait queues - * in order to notice the broken connection. - */ - wake_up_all(&sc->status_wait); - wake_up_all(&sc->send_io.lcredits.wait_queue); - wake_up_all(&sc->send_io.credits.wait_queue); - wake_up_all(&sc->send_io.pending.dec_wait_queue); - wake_up_all(&sc->send_io.pending.zero_wait_queue); - wake_up_all(&sc->recv_io.reassembly.wait_queue); - wake_up_all(&sc->mr_io.ready.wait_queue); - wake_up_all(&sc->mr_io.cleanup.wait_queue); -} - static void smbd_disconnect_rdma_work(struct work_struct *work) { struct smbdirect_socket *sc = @@ -308,7 +292,7 @@ static void smbd_disconnect_rdma_work(struct work_struct *work) * Wake up all waiters in all wait queues * in order to notice the broken connection. */ - smbd_disconnect_wake_up_all(sc); + smbdirect_socket_wake_up_all(sc); } static void smbd_disconnect_rdma_connection(struct smbdirect_socket *sc) @@ -374,7 +358,7 @@ static void smbd_disconnect_rdma_connection(struct smbdirect_socket *sc) * Wake up all waiters in all wait queues * in order to notice the broken connection. */ - smbd_disconnect_wake_up_all(sc); + smbdirect_socket_wake_up_all(sc); queue_work(sc->workqueue, &sc->disconnect_work); } @@ -1973,7 +1957,7 @@ void smbd_destroy(struct TCP_Server_Info *server) * Most likely this was already called via * smbd_disconnect_rdma_work(), but call it again... */ - smbd_disconnect_wake_up_all(sc); + smbdirect_socket_wake_up_all(sc); log_rdma_event(INFO, "cancelling recv_io.posted.refill_work\n"); disable_work_sync(&sc->recv_io.posted.refill_work);