mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
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 <behlendorf1@llnl.gov>
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user