]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
smbdirect: Fix error cleanup in smbdirect_map_sges_from_iter()
authorDavid Howells <dhowells@redhat.com>
Wed, 13 May 2026 18:50:02 +0000 (19:50 +0100)
committerSteve French <stfrench@microsoft.com>
Thu, 14 May 2026 18:21:00 +0000 (13:21 -0500)
commitc207f1d785044667f87cc8c72355e33f3981f2d6
treed1ceb720445dfeebe1fa5194387f6efed8962e93
parent81a874233c305d29e37fdb70b691ff4254294c0b
smbdirect: Fix error cleanup in smbdirect_map_sges_from_iter()

Fix smbdirect_map_sges_from_iter() to use pre-decrement, not post-decrement
so that it cleans up the correct slots.

Fixes: e5fbdde43017 ("cifs: Add a function to build an RDMA SGE list from an iterator")
Closes: https://sashiko.dev/#/patchset/20260326104544.509518-1-dhowells%40redhat.com
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
cc: Paulo Alcantara <pc@manguebit.org>
cc: Tom Talpey <tom@talpey.com>
cc: linux-cifs@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/smbdirect/connection.c