]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
smb: client: make use of smbdirect_socket_wake_up_all()
authorStefan Metzmacher <metze@samba.org>
Tue, 2 Sep 2025 10:49:44 +0000 (12:49 +0200)
committerSteve French <stfrench@microsoft.com>
Thu, 16 Apr 2026 02:58:21 +0000 (21:58 -0500)
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 <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 1d285d364a72b27a94abad713717d0806a67ca55..69ff1128e8f0ce4b9b4516ab2e994a2f9ef2fe1d 100644 (file)
@@ -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);