aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwuchi <wuchi.zero@gmail.com>2022-08-27 15:11:16 +0800
committerAndrew Morton <akpm@linux-foundation.org>2022-09-11 21:55:11 -0700
commit199cda13534f4c676d7e4601665e971f4f0582c4 (patch)
treed3c05fc0b66cc018e2712c316eaa8703878bd5df
parentfail_function: fix wrong use of fei_attr_remove() (diff)
downloadlinux-dev-199cda13534f4c676d7e4601665e971f4f0582c4.tar.xz
linux-dev-199cda13534f4c676d7e4601665e971f4f0582c4.zip
initramfs: mark my_inptr as __initdata
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>
-rw-r--r--init/initramfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/init/initramfs.c b/init/initramfs.c
index 18229cfe8906..2f5bfb7d7652 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -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>