Re: [PATCH v1 1/5] f2fs: Zero f2fs_folio_state on allocation

From: Chao Yu

Date: Tue Jan 06 2026 - 04:18:50 EST


On 1/5/2026 11:30 PM, Nanzhe Zhao wrote:
f2fs_folio_state is attached to folio->private and is expected to start
with read_pages_pending == 0. However, the structure was allocated from
ffs_entry_slab without being fully initialized, which can leave
read_pages_pending with stale values.

Allocate the object with __GFP_ZERO so all fields are reliably zeroed at
creation time.

Signed-off-by: Nanzhe Zhao <nzzhao@xxxxxxx>

Reviewed-by: Chao Yu <chao@xxxxxxxxxx>

Thanks,