Skip to content

Commit 8059c64

Browse files
metze-sambasmfrench
authored andcommitted
smb: server: smb_direct_disconnect_rdma_connection() already wakes all waiters on error
There's no need to care about pending or credit counters when we already disconnecting. And all related wait_event conditions already check for broken connections too. This will simplify the code and makes the following changes simpler. Cc: Namjae Jeon <linkinjeon@kernel.org> Cc: Steve French <smfrench@gmail.com> Cc: Tom Talpey <tom@talpey.com> 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>
1 parent 68335cb commit 8059c64

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

fs/smb/server/transport_rdma.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -987,8 +987,6 @@ static int smb_direct_post_send(struct smbdirect_socket *sc,
987987
ret = ib_post_send(sc->ib.qp, wr, NULL);
988988
if (ret) {
989989
pr_err("failed to post send: %d\n", ret);
990-
if (atomic_dec_and_test(&sc->send_io.pending.count))
991-
wake_up(&sc->send_io.pending.zero_wait_queue);
992990
smb_direct_disconnect_rdma_connection(sc);
993991
}
994992
return ret;
@@ -1037,8 +1035,6 @@ static int smb_direct_flush_send_list(struct smbdirect_socket *sc,
10371035
send_ctx->need_invalidate_rkey,
10381036
send_ctx->remote_key);
10391037
} else {
1040-
atomic_add(send_ctx->wr_cnt, &sc->send_io.credits.count);
1041-
wake_up(&sc->send_io.credits.wait_queue);
10421038
list_for_each_entry_safe(first, last, &send_ctx->msg_list,
10431039
sibling_list) {
10441040
smb_direct_free_sendmsg(sc, first);

0 commit comments

Comments
 (0)