From d16f67ba6401b0c9bad7109322a159ad8b3610e5 Mon Sep 17 00:00:00 2001 From: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com> Date: Fri, 11 Apr 2025 03:40:27 +0800 Subject: [PATCH] Add a pre-compile check in the kernel Makefile to ensure that the path_umount function must be backtracked on --- kernel/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/kernel/Makefile b/kernel/Makefile index 886fb5fd..92b2c40b 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -24,10 +24,6 @@ obj-$(CONFIG_KSU) += kernelsu.o obj-$(CONFIG_KPM) += kpm/ -# Do checks before compile -ifneq ($(shell grep -q "int path_umount" $(srctree)/fs/namespace.c; echo $$?),0) -$(error -- Backporting path_umount is mandatory !! Read: https://kernelsu.org/guide/how-to-integrate-for-non-gki.html#how-to-backport-path-umount) -endif # https://github.com/tiann/KernelSU/pull/2102/files#diff-3a325663233178293ee38b8161f3be511a466af7e0156b9d03d5aed0497564bfR19 IS_GKI := $(strip $(shell \ @@ -250,6 +246,12 @@ ifneq ($(shell grep -Eq "^int path_umount" $(srctree)/fs/internal.h; echo $$?),0 $(shell sed -i '/^extern void __init mnt_init/a int path_umount(struct path *path, int flags);' $(srctree)/fs/internal.h;) endif +# Do checks before compile +ifneq ($(shell grep -q "int path_umount" $(srctree)/fs/namespace.c; echo $$?),0) +$(error -- Backporting path_umount is mandatory !! Read: https://kernelsu.org/guide/how-to-integrate-for-non-gki.html#how-to-backport-path-umount) +endif + + ## For susfs stuff ## ifeq ($(shell test -e $(srctree)/fs/susfs.c; echo $$?),0) $(eval SUSFS_VERSION=$(shell cat $(srctree)/include/linux/susfs.h | grep -E '^#define SUSFS_VERSION' | cut -d' ' -f3 | sed 's/"//g'))