Fix minor chaos/fc9 kernel discrepencies in build

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@133 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
This commit is contained in:
behlendo 2008-06-13 23:56:26 +00:00
parent 2fb9b26a85
commit 5cbd57fa91
2 changed files with 21 additions and 7 deletions

View File

@ -453,6 +453,14 @@ void spl_kmem_fini(void);
#define kmem_cache_reap_now(skc) spl_kmem_cache_reap_now(skc)
#define kmem_reap() spl_kmem_reap()
#ifdef HAVE_KMEM_CACHE_CREATE_DTOR
#define __kmem_cache_create(name, size, align, flags, ctor, dtor) \
kmem_cache_create(name, size, align, flags, ctor, dtor)
#else
#define __kmem_cache_create(name, size, align, flags, ctor, dtor) \
kmem_cache_create(name, size, align, flags, ctor)
#endif /* HAVE_KMEM_CACHE_CREATE_DTOR */
#ifdef __cplusplus
}
#endif

View File

@ -427,6 +427,11 @@ spl_hash_ptr(void *ptr, unsigned int bits)
return hash_long((unsigned long)ptr >> PAGE_SHIFT, bits);
}
#ifndef list_first_entry
#define list_first_entry(ptr, type, member) \
list_entry((ptr)->next, type, member)
#endif
void *
spl_kmem_cache_alloc(spl_kmem_cache_t *skc, int flags)
{
@ -640,20 +645,21 @@ spl_kmem_init(void)
spl_slab_cache = NULL;
spl_obj_cache = NULL;
spl_slab_cache = kmem_cache_create("spl_slab_cache",
sizeof(spl_kmem_slab_t),
0, 0, NULL);
spl_slab_cache = __kmem_cache_create("spl_slab_cache",
sizeof(spl_kmem_slab_t),
0, 0, NULL, NULL);
if (spl_slab_cache == NULL)
GOTO(out_cache, rc = -ENOMEM);
spl_obj_cache = kmem_cache_create("spl_obj_cache",
sizeof(spl_kmem_obj_t),
0, 0, NULL);
spl_obj_cache = __kmem_cache_create("spl_obj_cache",
sizeof(spl_kmem_obj_t),
0, 0, NULL, NULL);
if (spl_obj_cache == NULL)
GOTO(out_cache, rc = -ENOMEM);
#ifdef HAVE_SET_SHRINKER
spl_kmem_cache_shrinker = set_shrinker(KMC_DEFAULT_SEEKS, shrinker);
spl_kmem_cache_shrinker = set_shrinker(KMC_DEFAULT_SEEKS,
kmem_cache_generic_shrinker);
if (spl_kmem_cache_shrinker == NULL)
GOTO(out_cache, rc = -ENOMEM);
#else