From d970e45f14e4ecac48f2445b1b8a132bc479b8b0 Mon Sep 17 00:00:00 2001 From: rsuntk Date: Thu, 21 Aug 2025 19:55:00 +0700 Subject: [PATCH] kernel: guard path_umount logging * path_umount pretty much guaranteed to work as is, so it would not need much logging. Unlike sys_umount which is an alternative to path_umount for older kernel, so, sys_umount need constant logging. Signed-off-by: rsuntk --- kernel/core_hook.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/core_hook.c b/kernel/core_hook.c index 4c9b7416..a7bd9091 100644 --- a/kernel/core_hook.c +++ b/kernel/core_hook.c @@ -1153,7 +1153,9 @@ static bool should_umount(struct path *path) static void ksu_path_umount(const char *mnt, struct path *path, int flags) { int ret = path_umount(path, flags); +#ifdef CONFIG_KSU_DEBUG pr_info("%s: path: %s ret: %d\n", __func__, mnt, ret); +#endif } #define ksu_umount_mnt(mnt, path, flags) (ksu_path_umount(mnt, path, flags)) #else @@ -1181,7 +1183,7 @@ static void ksu_sys_umount(const char *mnt, int flags) ksu_sys_umount(mnt, flags); \ }) -#endif +#endif #ifdef CONFIG_KSU_SUSFS_TRY_UMOUNT void ksu_try_umount(const char *mnt, bool check_mnt, int flags, uid_t uid)