Skip to content

Commit

Permalink
initramfs: mark my_inptr as __initdata
Browse files Browse the repository at this point in the history
As my_inptr is only used in __init function unpack_to_rootfs(), mark it as
__initdata to allow it be freed after boot.

Link: https://lkml.kernel.org/r/20220827071116.83078-1-wuchi.zero@gmail.com
Signed-off-by: wuchi <wuchi.zero@gmail.com>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Martin Wilck <mwilck@suse.com>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
ChiWu-Zero authored and akpm00 committed Sep 12, 2022
1 parent d2e8543 commit 199cda1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion init/initramfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ static long __init flush_buffer(void *bufv, unsigned long len)
return origLen;
}

static unsigned long my_inptr; /* index of next byte to be processed in inbuf */
static unsigned long my_inptr __initdata; /* index of next byte to be processed in inbuf */

#include <linux/decompress/generic.h>

Expand Down

0 comments on commit 199cda1

Please sign in to comment.