From 16e31bc1cd4f099d99ba02509bfe931ebdd03b4a Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Fri, 9 May 2014 04:14:39 +0000 Subject: [PATCH] Cleanup git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5512 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst.h | 12 ++++++++++++ scst/src/dev_handlers/scst_vdisk.c | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scst/include/scst.h b/scst/include/scst.h index cfe71067a..2caf1baa5 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -4752,6 +4752,18 @@ int scst_scsi_exec_async(struct scst_cmd *cmd, void *data, void (*done)(void *data, char *sense, int result, int resid)); #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) && !defined(RHEL_MAJOR) +/* + * See also patch "mm: add vzalloc() and vzalloc_node() helpers" (commit + * e1ca7788dec6773b1a2bce51b7141948f2b8bccf). + */ +static void *vzalloc(unsigned long size) +{ + return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, + PAGE_KERNEL); +} +#endif + int scst_get_file_mode(const char *path); bool scst_parent_dir_exists(const char *path); diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 56e1375a2..61c81657d 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -990,18 +990,6 @@ out_overflow: goto out; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37) && !defined(RHEL_MAJOR) -/* - * See also patch "mm: add vzalloc() and vzalloc_node() helpers" (commit - * e1ca7788dec6773b1a2bce51b7141948f2b8bccf). - */ -static void *vzalloc(unsigned long size) -{ - return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO, - PAGE_KERNEL); -} -#endif - static int vdev_save_mode_pages(const struct scst_vdisk_dev *virt_dev) { int res, rc, offs;