]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Squashfs: don't allocate fragment caches more than fragments
authorpangliyuan <pangliyuan1@huawei.com>
Tue, 10 Dec 2024 09:08:42 +0000 (17:08 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 13 Jan 2025 04:21:08 +0000 (20:21 -0800)
commit78188dd1d24b9d4cd78431feaa13120cfa37ca6a
tree0f773c3ee39f9afcb34b916a1efab5634ca3dafd
parent0fafc9e1563fbacb92b19ccbde5b8e73280d34b7
Squashfs: don't allocate fragment caches more than fragments

Sometimes the actual number of fragments in image is between
0 and SQUASHFS_CACHED_FRAGMENTS, which cause additional
fragment caches to be allocated.

Sets the number of fragment caches to the minimum of fragments
and SQUASHFS_CACHED_FRAGMENTS.

Link: https://lkml.kernel.org/r/20241210090842.160853-1-pangliyuan1@huawei.com
Signed-off-by: pangliyuan <pangliyuan1@huawei.com>
Reviewed-by: Phillip Lougher <phillip@squashfs.org.uk>
Cc: <wangfangpeng1@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/squashfs/super.c