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
This commit is contained in:
Bart Van Assche
2020-11-23 16:07:50 +00:00
parent a7214ad3d1
commit e9299277fd
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -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);
+2 -2
View File
@@ -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);
+1 -1
View File
@@ -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;