diff options
| author | Stefan Metzmacher <metze@samba.org> | 2025-09-08 22:22:35 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-10-29 14:08:53 +0100 |
| commit | a135fc271df534d1167c3a6e3b8c4aab50c92d44 (patch) | |
| tree | c07013488ec85cbf4a3e3e28cf793417f517046b /fs | |
| parent | 2770e2079995c9d7314283a4f6184769b527655a (diff) | |
| download | linux-a135fc271df534d1167c3a6e3b8c4aab50c92d44.tar.gz linux-a135fc271df534d1167c3a6e3b8c4aab50c92d44.tar.bz2 linux-a135fc271df534d1167c3a6e3b8c4aab50c92d44.zip | |
smb: server: let smb_direct_flush_send_list() invalidate a remote key first
[ Upstream commit 1b53426334c3c942db47e0959a2527a4f815af50 ]
If we want to invalidate a remote key we should do that as soon as
possible, so do it in the first send work request.
Acked-by: 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>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/smb/server/transport_rdma.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/smb/server/transport_rdma.c b/fs/smb/server/transport_rdma.c index 05dfef7ad67f..bf79c066a982 100644 --- a/fs/smb/server/transport_rdma.c +++ b/fs/smb/server/transport_rdma.c @@ -938,12 +938,15 @@ static int smb_direct_flush_send_list(struct smb_direct_transport *t, struct smb_direct_sendmsg, list); + if (send_ctx->need_invalidate_rkey) { + first->wr.opcode = IB_WR_SEND_WITH_INV; + first->wr.ex.invalidate_rkey = send_ctx->remote_key; + send_ctx->need_invalidate_rkey = false; + send_ctx->remote_key = 0; + } + last->wr.send_flags = IB_SEND_SIGNALED; last->wr.wr_cqe = &last->cqe; - if (is_last && send_ctx->need_invalidate_rkey) { - last->wr.opcode = IB_WR_SEND_WITH_INV; - last->wr.ex.invalidate_rkey = send_ctx->remote_key; - } ret = smb_direct_post_send(t, &first->wr); if (!ret) { |
