@@ -63,9 +63,11 @@ extern void susfs_try_umount(void);
|
|||||||
#endif // #ifdef CONFIG_KSU_SUSFS_TRY_UMOUNT
|
#endif // #ifdef CONFIG_KSU_SUSFS_TRY_UMOUNT
|
||||||
#endif // #ifdef CONFIG_KSU_SUSFS
|
#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);
|
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);
|
int err = path_umount(path, flags);
|
||||||
if (err) {
|
if (err) {
|
||||||
@@ -88,12 +90,12 @@ static void ksu_sys_umount(const char *mnt, int flags)
|
|||||||
set_fs(old_fs);
|
set_fs(old_fs);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ksu_umount_mnt(struct path *path, int flags)
|
#define ksu_umount_mnt(mnt, __unused, flags) \
|
||||||
{
|
({ \
|
||||||
const char *mnt = path->dentry->d_iname;
|
path_put(__unused); \
|
||||||
path_put(path);
|
ksu_sys_umount(mnt, flags); \
|
||||||
ksu_sys_umount(mnt, flags);
|
})
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_KSU_SUSFS_TRY_UMOUNT
|
#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)
|
#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
|
#ifdef CONFIG_KSU_SUSFS_TRY_UMOUNT
|
||||||
|
|||||||
Reference in New Issue
Block a user