Skip to content

Commit 6858531

Browse files
metze-sambasmfrench
authored andcommitted
smb: client: remove pointless sc->recv_io.credits.count rollback
We either reach this code path before we call new_credits = manage_credits_prior_sending(sc), which means new_credits is still 0 or the connection is already broken as smbd_post_send() already called smbd_disconnect_rdma_connection(). This will also simplify further changes. Cc: <stable@vger.kernel.org> # 6.18.x 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> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent bf1656e commit 6858531

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

fs/smb/client/smbdirect.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,9 +1288,6 @@ static int smbd_post_send_iter(struct smbdirect_socket *sc,
12881288
DMA_TO_DEVICE);
12891289
mempool_free(request, sc->send_io.mem.pool);
12901290

1291-
/* roll back the granted receive credits */
1292-
atomic_sub(new_credits, &sc->recv_io.credits.count);
1293-
12941291
err_alloc:
12951292
atomic_inc(&sc->send_io.credits.count);
12961293
wake_up(&sc->send_io.credits.wait_queue);

0 commit comments

Comments
 (0)