]> www.infradead.org Git - users/jedix/linux-maple.git/commit
udmabuf: udmabuf_create pin folio codestyle cleanup
authorHuan Yang <link@vivo.com>
Wed, 18 Sep 2024 02:52:27 +0000 (10:52 +0800)
committerVivek Kasireddy <vivek.kasireddy@intel.com>
Fri, 20 Sep 2024 21:07:33 +0000 (14:07 -0700)
commit164fd9efd46531fddfaa933d394569259896642b
tree21d6db5eb4ca9b9364fd3ef06080038c4ba73c22
parent18d7de823b7150344d242c3677e65d68c5271b04
udmabuf: udmabuf_create pin folio codestyle cleanup

This patch aim to simplify the memfd folio pin during the udmabuf
create. No functional changes.

This patch create a udmabuf_pin_folios function, in this, do the memfd
pin folio and then record each pinned folio, offset.

This patch simplify the pinned folio record, iter by each pinned folio,
and then record each offset in it.

Compare to iter by pgcnt, more readable.

Suggested-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Huan Yang <link@vivo.com>
Acked-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240918025238.2957823-5-link@vivo.com
drivers/dma-buf/udmabuf.c