mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 19:21:26 +00:00
Merged revisions 3656-3657 via svnmerge from
https://vlnb@scst.svn.sourceforge.net/svnroot/scst/trunk ........ r3656 | bvassche | 2011-07-04 12:20:23 -0400 (Mon, 04 Jul 2011) | 1 line Add iscsi-scst/kernel/patches/rhel/put_page_callback_addendum-rhel6.patch ........ r3657 | bvassche | 2011-07-05 12:49:23 -0400 (Tue, 05 Jul 2011) | 1 line scst: Avoid that scst_pr_remove_device_files() causes a crash if pr_file_name == NULL or pr_file_name1 == NULL ........ git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.1.0.x@3667 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
diff -upkr linux-2.6.32.x86_64/include/linux/Kbuild linux-2.6.32.x86_64/include/linux/Kbuild
|
||||
--- linux-2.6.32.x86_64/include/linux/Kbuild 2009-12-03 04:51:21.000000000 +0100
|
||||
+++ linux-2.6.32.x86_64/include/linux/Kbuild 2010-08-27 13:14:53.767830262 +0200
|
||||
@@ -112,6 +112,7 @@ header-y += map_to_7segment.h
|
||||
header-y += matroxfb.h
|
||||
header-y += meye.h
|
||||
header-y += minix_fs.h
|
||||
+header-y += mm.h
|
||||
header-y += mmtimer.h
|
||||
header-y += mqueue.h
|
||||
header-y += mtio.h
|
||||
@@ -928,28 +928,32 @@ static void scst_pr_remove_device_files(struct scst_tgt_dev *tgt_dev)
|
||||
set_fs(KERNEL_DS);
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
|
||||
res = path_lookup(dev->pr_file_name, 0, &nd);
|
||||
res = dev->pr_file_name ? path_lookup(dev->pr_file_name, 0, &nd) :
|
||||
-ENOENT;
|
||||
if (!res)
|
||||
scst_pr_vfs_unlink_and_put(&nd);
|
||||
else
|
||||
TRACE_DBG("Unable to lookup file '%s' - error %d",
|
||||
dev->pr_file_name, res);
|
||||
|
||||
res = path_lookup(dev->pr_file_name1, 0, &nd);
|
||||
res = dev->pr_file_name1 ? path_lookup(dev->pr_file_name1, 0, &nd) :
|
||||
-ENOENT;
|
||||
if (!res)
|
||||
scst_pr_vfs_unlink_and_put(&nd);
|
||||
else
|
||||
TRACE_DBG("Unable to lookup file '%s' - error %d",
|
||||
dev->pr_file_name1, res);
|
||||
#else
|
||||
res = kern_path(dev->pr_file_name, 0, &path);
|
||||
res = dev->pr_file_name ? kern_path(dev->pr_file_name, 0, &path) :
|
||||
-ENOENT;
|
||||
if (!res)
|
||||
scst_pr_vfs_unlink_and_put(&path);
|
||||
else
|
||||
TRACE_DBG("Unable to lookup file '%s' - error %d",
|
||||
dev->pr_file_name, res);
|
||||
|
||||
res = kern_path(dev->pr_file_name1, 0, &path);
|
||||
res = dev->pr_file_name1 ? kern_path(dev->pr_file_name1, 0, &path) :
|
||||
-ENOENT;
|
||||
if (!res)
|
||||
scst_pr_vfs_unlink_and_put(&path);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user