]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
smb: client: let destroy_mr_list() call ib_dereg_mr() before ib_dma_unmap_sg()
authorStefan Metzmacher <metze@samba.org>
Sun, 12 Oct 2025 19:10:29 +0000 (21:10 +0200)
committerSteve French <stfrench@microsoft.com>
Mon, 13 Oct 2025 13:26:22 +0000 (08:26 -0500)
commit1ef0e16c3d7ca07432987840d8eef1a9ffb67dec
tree5a069de07afb7f82807aea0015a3bb826cc0df97
parentb9c0becc2fceb53e4a958575344e92c0e4f812bb
smb: client: let destroy_mr_list() call ib_dereg_mr() before ib_dma_unmap_sg()

This is more consistent as we call ib_dma_unmap_sg() only
when the memory is no longer registered.

This is the same pattern as calling ib_dma_unmap_sg() after
IB_WR_LOCAL_INV.

Fixes: c7398583340a ("CIFS: SMBD: Implement RDMA memory registration")
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>
fs/smb/client/smbdirect.c