Commit 00feea1
f2fs: Zero f2fs_folio_state on allocation
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@126.com>
Reviewed-by: Barry Song <baohua@kernel.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>1 parent d36de29 commit 00feea1
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2399 | 2399 | | |
2400 | 2400 | | |
2401 | 2401 | | |
2402 | | - | |
| 2402 | + | |
| 2403 | + | |
2403 | 2404 | | |
2404 | 2405 | | |
2405 | 2406 | | |
| |||
0 commit comments