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 <[email protected]> Cc: Steve French <[email protected]> Cc: Tom Talpey <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Stefan Metzmacher <[email protected]> Acked-by: Namjae Jeon <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 68335cb commit 8059c64

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

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)