From 7e88e9648f8d66d9c66cdd274cbba77677357a91 Mon Sep 17 00:00:00 2001 From: rsuntk Date: Thu, 22 May 2025 15:27:29 +0700 Subject: [PATCH] kernel: guard nuke_ext4_sysfs Rather than using depends on / select, i just prefer this way, although, yes, it is an ifdef hell. Signed-off-by: rsuntk --- kernel/core_hook.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/core_hook.c b/kernel/core_hook.c index 96605e01..d0f6973a 100644 --- a/kernel/core_hook.c +++ b/kernel/core_hook.c @@ -226,6 +226,7 @@ int ksu_handle_rename(struct dentry *old_dentry, struct dentry *new_dentry) return 0; } +#ifdef CONFIG_EXT4_FS static void nuke_ext4_sysfs() { struct path path; int err = kern_path("/data/adb/modules", 0, &path); @@ -243,6 +244,9 @@ static void nuke_ext4_sysfs() { ext4_unregister_sysfs(sb); } +#else +static inline void nuke_ext4_sysfs() { } +#endif int ksu_handle_prctl(int option, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5)