smb: client: let smbd_post_send_iter() call ib_dma_map_single() for the header first
authorStefan Metzmacher <metze@samba.org>
Sun, 14 Sep 2025 22:55:31 +0000 (00:55 +0200)
committerSteve French <stfrench@microsoft.com>
Sun, 28 Sep 2025 23:29:51 +0000 (18:29 -0500)
commit2dad0b15bbe86ffa6d2f234c40609aa59894e9ec
treec60c394d92996adc271b49894c583c5d528be863
parentc4709e61ef253eed4257328b614e7c57fed259ec
smb: client: let smbd_post_send_iter() call ib_dma_map_single() for the header first

This will simplify further changes, the important part is that
request->num_sge >= 1 is only set if request->sge[0].* is valid.

Note that ib_dma_sync_single_for_device() is called in
smbd_post_send() for each sge, so the device will still
see the packet header even if it's modified after calling
ib_dma_map_single().

Cc: Steve French <smfrench@gmail.com>
Cc: Tom Talpey <tom@talpey.com>
Cc: Long Li <longli@microsoft.com>
Acked-by: 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