From e9299277fd5461348f78b1bcb31c388d3beb6d50 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 23 Nov 2020 16:07:50 +0000 Subject: [PATCH] scst: Use kern_path() from kernel version v2.6.28 on See also commit d181146572c4 ("[PATCH] new helper - kern_path()"; v2.6.28). git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9192 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 4 ++-- scst/src/scst_lib.c | 4 ++-- scst/src/scst_pres.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 33672d14d..351c53800 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -10076,7 +10076,7 @@ static void init_ops(vdisk_op_fn *ops, int count) static int __init vdev_check_mode_pages_path(void) { int res; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28) struct nameidata nd; #else struct path path; @@ -10084,7 +10084,7 @@ static int __init vdev_check_mode_pages_path(void) TRACE_ENTRY(); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28) res = path_lookup(VDEV_MODE_PAGES_DIR, 0, &nd); if (res == 0) scst_path_put(&nd); diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 54aca49a3..14629687c 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -15210,7 +15210,7 @@ out: int scst_remove_file(const char *name) { int res = 0; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28) struct nameidata nd; #else struct path path; @@ -15218,7 +15218,7 @@ int scst_remove_file(const char *name) TRACE_ENTRY(); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28) res = path_lookup(name, 0, &nd); if (!res) scst_vfs_unlink_and_put(&nd); diff --git a/scst/src/scst_pres.c b/scst/src/scst_pres.c index 12c44cfc3..5c1703374 100644 --- a/scst/src/scst_pres.c +++ b/scst/src/scst_pres.c @@ -1017,7 +1017,7 @@ write_error: write_error_close: filp_close(file, NULL); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28) { struct nameidata nd; int rc;