diff options
| author | Zhan Xusheng <zhanxusheng@xiaomi.com> | 2026-03-31 13:02:49 +0800 |
|---|---|---|
| committer | Gao Xiang <hsiangkao@linux.alibaba.com> | 2026-04-02 16:08:49 +0800 |
| commit | 5de6951fedb29700ace53b283ccb951c8f712d12 (patch) | |
| tree | 3884d2bb4eacc69f8bab7814e73b44ad25384356 /arch/um/os-Linux/include/git@git.tavy.me:linux.git | |
| parent | 307210c262a29f41d7177851295ea1703bd04175 (diff) | |
erofs: ensure all folios are managed in erofs_try_to_free_all_cached_folios()
folio_trylock() in erofs_try_to_free_all_cached_folios() may
successfully acquire the folio lock, but the subsequent check
for erofs_folio_is_managed() can skip unlocking when the folio
is not managed by EROFS.
As Gao Xiang pointed out, this condition should not happen in
practice because compressed_bvecs[] only holds valid cached folios
at this point — any non-managed folio would have already been
detached by z_erofs_cache_release_folio() under folio lock.
Fix this by adding DBG_BUGON() to catch unexpected folios
and ensure folio_unlock() is always called.
Suggested-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Reviewed-by: Chunhai Guo <guochunhai@vivo.com>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Diffstat (limited to 'arch/um/os-Linux/include/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
