diff options
| author | Nikhil Gurudasani <nikhilgurudasani314@gmail.com> | 2026-08-22 19:30:17 +0530 |
|---|---|---|
| committer | Gao Xiang <xiang@kernel.org> | 2026-08-24 12:21:09 +0800 |
| commit | a7d097cf01301c5da37927c8f26123d006f0fd8a (patch) | |
| tree | 970257e1cb9beec55ebfc22c7688b371c797e1fb /include/linux/timerqueue_types.h | |
| parent | c77516e1e6fe914eb74d5f7a8ba9851f4ce31867 (diff) | |
erofs: skip sufficiently large global buffers when resizing
z_erofs_gbuf_nrpages is advanced only after every global buffer has been
grown. If a resize fails after some buffers were enlarged, a retry
revisits those enlarged buffers.
Retrying the same size then returns -ENOMEM because alloc_pages_bulk()
has no pages to add and the unchanged return value is treated as a
failure. Retrying an intermediate size allocates a temporary pointer
array smaller than gbuf->nrpages and copies more existing pointers than
the array can hold.
Skip buffers that already satisfy the request. Once all remaining
buffers have caught up, advancing z_erofs_gbuf_nrpages again describes
the guaranteed minimum size across the pool.
Fixes: d6db47e571dc ("erofs: do not use pagepool in z_erofs_gbuf_growsize()")
Cc: stable@vger.kernel.org # 6.10+
Signed-off-by: Nikhil Gurudasani <nikhilgurudasani314@gmail.com>
Reviewed-by: Gao Xiang <xiang@kernel.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <xiang@kernel.org>
Diffstat (limited to 'include/linux/timerqueue_types.h')
0 files changed, 0 insertions, 0 deletions
