Skip to content

Commit 08de09b

Browse files
committed
kernel: core_hook: tweak and rename path_umount handler
rename function to ksu_path_umount to clearly differntiate it from sys_umount. Pass mnt string directly to avoid redundant resolution for debug logging. Small touches, to make it neater. Signed-off-by: backslashxx <[email protected]>
1 parent 5b9cf8a commit 08de09b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

kernel/core_hook.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -510,12 +510,10 @@ static bool should_umount(struct path *path)
510510
}
511511

512512
#ifdef KSU_HAS_PATH_UMOUNT
513-
static void ksu_umount_mnt(struct path *path, int flags)
513+
static void ksu_path_umount(const char *mnt, struct path *path, int flags)
514514
{
515515
int err = path_umount(path, flags);
516-
if (err) {
517-
pr_info("umount %s failed: %d\n", path->dentry->d_iname, err);
518-
}
516+
pr_info("%s: path: %s code: %d\n", __func__, mnt, err);
519517
}
520518
#else
521519
static void ksu_sys_umount(const char *mnt, int flags)
@@ -553,7 +551,7 @@ static void try_umount(const char *mnt, bool check_mnt, int flags)
553551
}
554552

555553
#ifdef KSU_HAS_PATH_UMOUNT
556-
ksu_umount_mnt(&path, flags);
554+
ksu_path_umount(mnt, &path, flags);
557555
#else
558556
ksu_sys_umount(mnt, flags);
559557
#endif

0 commit comments

Comments
 (0)