aboutsummaryrefslogtreecommitdiffstats
path: root/module/spl
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2014-10-01 19:27:29 -0400
committerBrian Behlendorf <[email protected]>2014-10-17 15:11:51 -0700
commit89a461e70c13c860d336dc36358bb02172ed6346 (patch)
treee3e26b68b986178614d46907b3d2ed66604a0707 /module/spl
parent8bbbe46f8680389888d6111f8d81429dcc5defac (diff)
Remove shrink_{i,d}node_cache() wrappers
This is optional functionality which may or may not be useful to ZFS when using older kernels. It is never a hard requirement. Therefore this functionality is being removed from the SPL and a simpler slimmed down version will be added to ZFS. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/spl')
-rw-r--r--module/spl/spl-generic.c14
-rw-r--r--module/spl/spl-kmem.c31
2 files changed, 5 insertions, 40 deletions
diff --git a/module/spl/spl-generic.c b/module/spl/spl-generic.c
index 1059fb3cc..dacd0e260 100644
--- a/module/spl/spl-generic.c
+++ b/module/spl/spl-generic.c
@@ -490,7 +490,6 @@ zone_get_hostid(void *zone)
}
EXPORT_SYMBOL(zone_get_hostid);
-#ifndef HAVE_KALLSYMS_LOOKUP_NAME
/*
* The kallsyms_lookup_name() kernel function is not an exported symbol in
* Linux 2.6.19 through 2.6.32 inclusive.
@@ -499,7 +498,6 @@ EXPORT_SYMBOL(zone_get_hostid);
* space where /proc/kallsyms is consulted for the requested address.
*
*/
-
#define GET_KALLSYMS_ADDR_CMD \
"exec 0</dev/null " \
" 1>/proc/sys/kernel/spl/kallsyms_lookup_name " \
@@ -510,6 +508,7 @@ EXPORT_SYMBOL(zone_get_hostid);
static int
set_kallsyms_lookup_name(void)
{
+#ifndef HAVE_KALLSYMS_LOOKUP_NAME
char *argv[] = { "/bin/sh",
"-c",
GET_KALLSYMS_ADDR_CMD,
@@ -543,9 +542,11 @@ set_kallsyms_lookup_name(void)
printk("SPL: Failed user helper '%s %s %s', rc = %d\n",
argv[0], argv[1], argv[2], rc);
- return rc;
+ return (rc);
+#else
+ return (0);
+#endif /* HAVE_KALLSYMS_LOOKUP_NAME */
}
-#endif
static int
__init spl_init(void)
@@ -582,13 +583,8 @@ __init spl_init(void)
if ((rc = spl_zlib_init()))
SGOTO(out9, rc);
-#ifndef HAVE_KALLSYMS_LOOKUP_NAME
if ((rc = set_kallsyms_lookup_name()))
SGOTO(out10, rc = -EADDRNOTAVAIL);
-#endif /* HAVE_KALLSYMS_LOOKUP_NAME */
-
- if ((rc = spl_kmem_init_kallsyms_lookup()))
- SGOTO(out10, rc);
printk(KERN_NOTICE "SPL: Loaded module v%s-%s%s\n", SPL_META_VERSION,
SPL_META_RELEASE, SPL_DEBUG_STR);
diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c
index aeb1d2a06..caeb324b3 100644
--- a/module/spl/spl-kmem.c
+++ b/module/spl/spl-kmem.c
@@ -110,16 +110,6 @@ EXPORT_SYMBOL(zio_alloc_arena);
vmem_t *zio_arena = NULL;
EXPORT_SYMBOL(zio_arena);
-#ifndef HAVE_SHRINK_DCACHE_MEMORY
-shrink_dcache_memory_t shrink_dcache_memory_fn = SYMBOL_POISON;
-EXPORT_SYMBOL(shrink_dcache_memory_fn);
-#endif /* HAVE_SHRINK_DCACHE_MEMORY */
-
-#ifndef HAVE_SHRINK_ICACHE_MEMORY
-shrink_icache_memory_t shrink_icache_memory_fn = SYMBOL_POISON;
-EXPORT_SYMBOL(shrink_icache_memory_fn);
-#endif /* HAVE_SHRINK_ICACHE_MEMORY */
-
size_t
vmem_size(vmem_t *vmp, int typemask)
{
@@ -2316,27 +2306,6 @@ spl_kmem_fini_tracking(struct list_head *list, spinlock_t *lock)
#define spl_kmem_fini_tracking(list, lock)
#endif /* DEBUG_KMEM && DEBUG_KMEM_TRACKING */
-/*
- * Called at module init when it is safe to use spl_kallsyms_lookup_name()
- */
-int
-spl_kmem_init_kallsyms_lookup(void)
-{
-#ifndef HAVE_SHRINK_DCACHE_MEMORY
- /* When shrink_dcache_memory_fn == NULL support is disabled */
- shrink_dcache_memory_fn = (shrink_dcache_memory_t)
- spl_kallsyms_lookup_name("shrink_dcache_memory");
-#endif /* HAVE_SHRINK_DCACHE_MEMORY */
-
-#ifndef HAVE_SHRINK_ICACHE_MEMORY
- /* When shrink_icache_memory_fn == NULL support is disabled */
- shrink_icache_memory_fn = (shrink_icache_memory_t)
- spl_kallsyms_lookup_name("shrink_icache_memory");
-#endif /* HAVE_SHRINK_ICACHE_MEMORY */
-
- return 0;
-}
-
int
spl_kmem_init(void)
{