diff --git a/iscsi-scst/kernel/patches/rhel/put_page_callback_addendum-rhel6.patch b/iscsi-scst/kernel/patches/rhel/put_page_callback_addendum-rhel6.patch new file mode 100644 index 000000000..38a0896ed --- /dev/null +++ b/iscsi-scst/kernel/patches/rhel/put_page_callback_addendum-rhel6.patch @@ -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 diff --git a/scst/src/scst_pres.c b/scst/src/scst_pres.c index 0ca4c92ba..689ffa691 100644 --- a/scst/src/scst_pres.c +++ b/scst/src/scst_pres.c @@ -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