Commit 8e86e990 authored by Huan Yang's avatar Huan Yang Committed by Greg Kroah-Hartman
Browse files

udmabuf: udmabuf_create pin folio codestyle cleanup



[ Upstream commit 164fd9ef ]

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: default avatarVivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: default avatarHuan Yang <link@vivo.com>
Acked-by: default avatarVivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: default avatarVivek Kasireddy <vivek.kasireddy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240918025238.2957823-5-link@vivo.com


Stable-dep-of: f49856f5 ("udmabuf: fix memory leak on last export_udmabuf() error path")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 004da42b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment