Commit 78188dd1 authored by pangliyuan's avatar pangliyuan Committed by Andrew Morton
Browse files

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: default avatarpangliyuan <pangliyuan1@huawei.com>
Reviewed-by: default avatarPhillip Lougher <phillip@squashfs.org.uk>
Cc: <wangfangpeng1@huawei.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 0fafc9e1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment