kernel: fix ksu_sys_umount compatibility
* Some people reports about undefined reference to `sys_umount` * Since ksys_umount exist on Linux 4.17-rc1, then we gonna use that one. Rev 2: Use correct int instead of long for ksys_umount Signed-off-by: rsuntk <90097027+rsuntk@users.noreply.github.com>
This commit is contained in:
@@ -993,7 +993,11 @@ static int ksu_sys_umount(const char *mnt, int flags)
|
||||
|
||||
mm_segment_t old_fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)
|
||||
int ret = ksys_umount(usermnt, flags);
|
||||
#else
|
||||
long ret = sys_umount(usermnt, flags); // cuz asmlinkage long sys##name
|
||||
#endif
|
||||
set_fs(old_fs);
|
||||
pr_info("%s: path: %s code: %d \n", __func__, usermnt, ret);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user