Skip to content

initramfs: Reduce hardlink hash allocation sizes - #2617

Open
vfsci-bot[bot] wants to merge 1 commit into
vfs.base.cifrom
pw/1169440/vfs.base.ci
Open

vfsci-bot[bot] wants to merge 1 commit into
vfs.base.cifrom
pw/1169440/vfs.base.ci

Conversation

@vfsci-bot

@vfsci-bot vfsci-bot Bot commented Sep 20, 2026

Copy link
Copy Markdown

Series: https://patchwork.kernel.org/project/linux-fsdevel/list/?series=1169440
Submitter: Thorsten Blum
Version: 1
Patches: 1/1
Message-ID: <20260919213859.24667-3-blum@kernel.org>
Base: vfs.base.ci
Lore: https://lore.kernel.org/linux-fsdevel/20260919213859.24667-3-blum@kernel.org


Automated by ml2pr

Each hardlink hash entry reserves N_ALIGN(PATH_MAX) bytes for its name.
This makes every allocation larger than 4 KiB, placing it in the
kmalloc-8k bucket even for short names.

Use a flexible array with the already validated cpio name_len to reduce
allocation sizes.

Also use const for the read-only name parameter.

Signed-off-by: Thorsten Blum <blum@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant