Skip to content

Commit 1a2180f

Browse files
committed
erofs: fix PSI memstall accounting
Max Kellermann recently reported psi_group_cpu.tasks[NR_MEMSTALL] is incorrect in the 6.11.9 kernel. The root cause appears to be that, since the problematic commit, bio can be NULL, causing psi_memstall_leave() to be skipped in z_erofs_submit_queue(). Reported-by: Max Kellermann <max.kellermann@ionos.com> Closes: https://lore.kernel.org/r/CAKPOu+8tvSowiJADW2RuKyofL_CSkm_SuyZA7ME5vMLWmL6pqw@mail.gmail.com Fixes: 9e2f9d3 ("erofs: handle overlapped pclusters out of crafted images properly") Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com> Link: https://lore.kernel.org/r/20241127085236.3538334-1-hsiangkao@linux.alibaba.com
1 parent b10a1e5 commit 1a2180f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

fs/erofs/zdata.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1792,9 +1792,9 @@ static void z_erofs_submit_queue(struct z_erofs_decompress_frontend *f,
17921792
erofs_fscache_submit_bio(bio);
17931793
else
17941794
submit_bio(bio);
1795-
if (memstall)
1796-
psi_memstall_leave(&pflags);
17971795
}
1796+
if (memstall)
1797+
psi_memstall_leave(&pflags);
17981798

17991799
/*
18001800
* although background is preferred, no one is pending for submission.

0 commit comments

Comments
 (0)