kernel: fix build

Co-authored-by: Faris <rissu.ntk@gmail.com>
This commit is contained in:
ShirkNeko
2025-11-18 23:17:40 +08:00
parent 7fc075679e
commit 957999ba09

View File

@@ -63,9 +63,11 @@ extern void susfs_try_umount(void);
#endif // #ifdef CONFIG_KSU_SUSFS_TRY_UMOUNT
#endif // #ifdef CONFIG_KSU_SUSFS
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0) || defined(KSU_HAS_PATH_UMOUNT)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0) || \
defined(KSU_HAS_PATH_UMOUNT)
extern int path_umount(struct path *path, int flags);
static void ksu_umount_mnt(struct path *path, int flags)
static void ksu_umount_mnt(const char *__never_use_mnt, struct path *path,
int flags)
{
int err = path_umount(path, flags);
if (err) {
@@ -88,12 +90,12 @@ static void ksu_sys_umount(const char *mnt, int flags)
set_fs(old_fs);
}
static void ksu_umount_mnt(struct path *path, int flags)
{
const char *mnt = path->dentry->d_iname;
path_put(path);
ksu_sys_umount(mnt, flags);
}
#define ksu_umount_mnt(mnt, __unused, flags) \
({ \
path_put(__unused); \
ksu_sys_umount(mnt, flags); \
})
#endif
#ifndef CONFIG_KSU_SUSFS_TRY_UMOUNT
@@ -120,7 +122,7 @@ void try_umount(const char *mnt, int flags)
}
#endif // #if defined(CONFIG_KSU_SUSFS_TRY_UMOUNT) && defined(CONFIG_KSU_SUSFS_ENABLE_LOG)
ksu_umount_mnt(&path, flags);
ksu_umount_mnt(mnt, &path, flags);
}
#ifdef CONFIG_KSU_SUSFS_TRY_UMOUNT