mm: Remove slab destructors from kmem_cache_create().
Slab destructors were no longer supported after Christoph's
c59def9f22
change. They've been
BUGs for both slab and slub, and slob never supported them
either.
This rips out support for the dtor pointer from kmem_cache_create()
completely and fixes up every single callsite in the kernel (there were
about 224, not including the slab allocator definitions themselves,
or the documentation references).
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
Родитель
64fb98fc40
Коммит
20c2df83d2
|
@ -1333,7 +1333,7 @@ int __init s3c24xx_dma_init(unsigned int channels, unsigned int irq,
|
||||||
dma_kmem = kmem_cache_create("dma_desc",
|
dma_kmem = kmem_cache_create("dma_desc",
|
||||||
sizeof(struct s3c2410_dma_buf), 0,
|
sizeof(struct s3c2410_dma_buf), 0,
|
||||||
SLAB_HWCACHE_ALIGN,
|
SLAB_HWCACHE_ALIGN,
|
||||||
s3c2410_dma_cache_ctor, NULL);
|
s3c2410_dma_cache_ctor);
|
||||||
|
|
||||||
if (dma_kmem == NULL) {
|
if (dma_kmem == NULL) {
|
||||||
printk(KERN_ERR "dma failed to make kmem cache\n");
|
printk(KERN_ERR "dma failed to make kmem cache\n");
|
||||||
|
|
|
@ -176,9 +176,9 @@ void __init pgtable_cache_init(void)
|
||||||
{
|
{
|
||||||
pte_cache = kmem_cache_create("pte-cache",
|
pte_cache = kmem_cache_create("pte-cache",
|
||||||
sizeof(pte_t) * PTRS_PER_PTE,
|
sizeof(pte_t) * PTRS_PER_PTE,
|
||||||
0, SLAB_PANIC, pte_cache_ctor, NULL);
|
0, SLAB_PANIC, pte_cache_ctor);
|
||||||
|
|
||||||
pgd_cache = kmem_cache_create("pgd-cache", MEMC_TABLE_SIZE +
|
pgd_cache = kmem_cache_create("pgd-cache", MEMC_TABLE_SIZE +
|
||||||
sizeof(pgd_t) * PTRS_PER_PGD,
|
sizeof(pgd_t) * PTRS_PER_PGD,
|
||||||
0, SLAB_PANIC, pgd_cache_ctor, NULL);
|
0, SLAB_PANIC, pgd_cache_ctor);
|
||||||
}
|
}
|
||||||
|
|
|
@ -752,8 +752,7 @@ void __init pgtable_cache_init(void)
|
||||||
PTRS_PER_PMD*sizeof(pmd_t),
|
PTRS_PER_PMD*sizeof(pmd_t),
|
||||||
PTRS_PER_PMD*sizeof(pmd_t),
|
PTRS_PER_PMD*sizeof(pmd_t),
|
||||||
SLAB_PANIC,
|
SLAB_PANIC,
|
||||||
pmd_ctor,
|
pmd_ctor);
|
||||||
NULL);
|
|
||||||
if (!SHARED_KERNEL_PMD) {
|
if (!SHARED_KERNEL_PMD) {
|
||||||
/* If we're in PAE mode and have a non-shared
|
/* If we're in PAE mode and have a non-shared
|
||||||
kernel pmd, then the pgd size must be a
|
kernel pmd, then the pgd size must be a
|
||||||
|
|
|
@ -253,7 +253,7 @@ ia32_init (void)
|
||||||
|
|
||||||
partial_page_cachep = kmem_cache_create("partial_page_cache",
|
partial_page_cachep = kmem_cache_create("partial_page_cache",
|
||||||
sizeof(struct partial_page),
|
sizeof(struct partial_page),
|
||||||
0, SLAB_PANIC, NULL, NULL);
|
0, SLAB_PANIC, NULL);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -804,7 +804,7 @@ int __init rtas_flash_init(void)
|
||||||
|
|
||||||
flash_block_cache = kmem_cache_create("rtas_flash_cache",
|
flash_block_cache = kmem_cache_create("rtas_flash_cache",
|
||||||
RTAS_BLK_SIZE, RTAS_BLK_SIZE, 0,
|
RTAS_BLK_SIZE, RTAS_BLK_SIZE, 0,
|
||||||
rtas_block_ctor, NULL);
|
rtas_block_ctor);
|
||||||
if (!flash_block_cache) {
|
if (!flash_block_cache) {
|
||||||
printk(KERN_ERR "%s: failed to create block cache\n",
|
printk(KERN_ERR "%s: failed to create block cache\n",
|
||||||
__FUNCTION__);
|
__FUNCTION__);
|
||||||
|
|
|
@ -542,7 +542,7 @@ static int __init hugetlbpage_init(void)
|
||||||
HUGEPTE_TABLE_SIZE,
|
HUGEPTE_TABLE_SIZE,
|
||||||
HUGEPTE_TABLE_SIZE,
|
HUGEPTE_TABLE_SIZE,
|
||||||
0,
|
0,
|
||||||
zero_ctor, NULL);
|
zero_ctor);
|
||||||
if (! huge_pgtable_cache)
|
if (! huge_pgtable_cache)
|
||||||
panic("hugetlbpage_init(): could not create hugepte cache\n");
|
panic("hugetlbpage_init(): could not create hugepte cache\n");
|
||||||
|
|
||||||
|
|
|
@ -178,7 +178,6 @@ void pgtable_cache_init(void)
|
||||||
pgtable_cache[i] = kmem_cache_create(name,
|
pgtable_cache[i] = kmem_cache_create(name,
|
||||||
size, size,
|
size, size,
|
||||||
SLAB_PANIC,
|
SLAB_PANIC,
|
||||||
zero_ctor,
|
zero_ctor);
|
||||||
NULL);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -654,7 +654,7 @@ static int __init spufs_init(void)
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
spufs_inode_cache = kmem_cache_create("spufs_inode_cache",
|
spufs_inode_cache = kmem_cache_create("spufs_inode_cache",
|
||||||
sizeof(struct spufs_inode_info), 0,
|
sizeof(struct spufs_inode_info), 0,
|
||||||
SLAB_HWCACHE_ALIGN, spufs_init_once, NULL);
|
SLAB_HWCACHE_ALIGN, spufs_init_once);
|
||||||
|
|
||||||
if (!spufs_inode_cache)
|
if (!spufs_inode_cache)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
@ -371,8 +371,7 @@ static int __init sq_api_init(void)
|
||||||
printk(KERN_NOTICE "sq: Registering store queue API.\n");
|
printk(KERN_NOTICE "sq: Registering store queue API.\n");
|
||||||
|
|
||||||
sq_cache = kmem_cache_create("store_queue_cache",
|
sq_cache = kmem_cache_create("store_queue_cache",
|
||||||
sizeof(struct sq_mapping), 0, 0,
|
sizeof(struct sq_mapping), 0, 0, NULL);
|
||||||
NULL, NULL);
|
|
||||||
if (unlikely(!sq_cache))
|
if (unlikely(!sq_cache))
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
|
@ -310,7 +310,7 @@ static int __init pmb_init(void)
|
||||||
BUG_ON(unlikely(nr_entries >= NR_PMB_ENTRIES));
|
BUG_ON(unlikely(nr_entries >= NR_PMB_ENTRIES));
|
||||||
|
|
||||||
pmb_cache = kmem_cache_create("pmb", sizeof(struct pmb_entry), 0,
|
pmb_cache = kmem_cache_create("pmb", sizeof(struct pmb_entry), 0,
|
||||||
SLAB_PANIC, pmb_cache_ctor, NULL);
|
SLAB_PANIC, pmb_cache_ctor);
|
||||||
|
|
||||||
jump_to_P2();
|
jump_to_P2();
|
||||||
|
|
||||||
|
|
|
@ -262,8 +262,7 @@ void __init pgtable_cache_init(void)
|
||||||
|
|
||||||
tsb_caches[i] = kmem_cache_create(name,
|
tsb_caches[i] = kmem_cache_create(name,
|
||||||
size, size,
|
size, size,
|
||||||
0,
|
0, NULL);
|
||||||
NULL, NULL);
|
|
||||||
if (!tsb_caches[i]) {
|
if (!tsb_caches[i]) {
|
||||||
prom_printf("Could not create %s cache\n", name);
|
prom_printf("Could not create %s cache\n", name);
|
||||||
prom_halt();
|
prom_halt();
|
||||||
|
|
|
@ -1043,7 +1043,7 @@ static int __init bsg_init(void)
|
||||||
dev_t devid;
|
dev_t devid;
|
||||||
|
|
||||||
bsg_cmd_cachep = kmem_cache_create("bsg_cmd",
|
bsg_cmd_cachep = kmem_cache_create("bsg_cmd",
|
||||||
sizeof(struct bsg_command), 0, 0, NULL, NULL);
|
sizeof(struct bsg_command), 0, 0, NULL);
|
||||||
if (!bsg_cmd_cachep) {
|
if (!bsg_cmd_cachep) {
|
||||||
printk(KERN_ERR "bsg: failed creating slab cache\n");
|
printk(KERN_ERR "bsg: failed creating slab cache\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
|
@ -3698,13 +3698,13 @@ int __init blk_dev_init(void)
|
||||||
panic("Failed to create kblockd\n");
|
panic("Failed to create kblockd\n");
|
||||||
|
|
||||||
request_cachep = kmem_cache_create("blkdev_requests",
|
request_cachep = kmem_cache_create("blkdev_requests",
|
||||||
sizeof(struct request), 0, SLAB_PANIC, NULL, NULL);
|
sizeof(struct request), 0, SLAB_PANIC, NULL);
|
||||||
|
|
||||||
requestq_cachep = kmem_cache_create("blkdev_queue",
|
requestq_cachep = kmem_cache_create("blkdev_queue",
|
||||||
sizeof(request_queue_t), 0, SLAB_PANIC, NULL, NULL);
|
sizeof(request_queue_t), 0, SLAB_PANIC, NULL);
|
||||||
|
|
||||||
iocontext_cachep = kmem_cache_create("blkdev_ioc",
|
iocontext_cachep = kmem_cache_create("blkdev_ioc",
|
||||||
sizeof(struct io_context), 0, SLAB_PANIC, NULL, NULL);
|
sizeof(struct io_context), 0, SLAB_PANIC, NULL);
|
||||||
|
|
||||||
for_each_possible_cpu(i)
|
for_each_possible_cpu(i)
|
||||||
INIT_LIST_HEAD(&per_cpu(blk_cpu_done, i));
|
INIT_LIST_HEAD(&per_cpu(blk_cpu_done, i));
|
||||||
|
|
|
@ -1098,7 +1098,7 @@ void acpi_os_release_lock(acpi_spinlock lockp, acpi_cpu_flags flags)
|
||||||
acpi_status
|
acpi_status
|
||||||
acpi_os_create_cache(char *name, u16 size, u16 depth, acpi_cache_t ** cache)
|
acpi_os_create_cache(char *name, u16 size, u16 depth, acpi_cache_t ** cache)
|
||||||
{
|
{
|
||||||
*cache = kmem_cache_create(name, size, 0, 0, NULL, NULL);
|
*cache = kmem_cache_create(name, size, 0, 0, NULL);
|
||||||
if (*cache == NULL)
|
if (*cache == NULL)
|
||||||
return AE_ERROR;
|
return AE_ERROR;
|
||||||
else
|
else
|
||||||
|
|
|
@ -259,7 +259,7 @@ aoeblk_init(void)
|
||||||
{
|
{
|
||||||
buf_pool_cache = kmem_cache_create("aoe_bufs",
|
buf_pool_cache = kmem_cache_create("aoe_bufs",
|
||||||
sizeof(struct buf),
|
sizeof(struct buf),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (buf_pool_cache == NULL)
|
if (buf_pool_cache == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
|
@ -1729,7 +1729,7 @@ static int __init ether1394_init_module(void)
|
||||||
|
|
||||||
packet_task_cache = kmem_cache_create("packet_task",
|
packet_task_cache = kmem_cache_create("packet_task",
|
||||||
sizeof(struct packet_task),
|
sizeof(struct packet_task),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (!packet_task_cache)
|
if (!packet_task_cache)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
|
@ -2998,7 +2998,6 @@ static int __init ib_mad_init_module(void)
|
||||||
sizeof(struct ib_mad_private),
|
sizeof(struct ib_mad_private),
|
||||||
0,
|
0,
|
||||||
SLAB_HWCACHE_ALIGN,
|
SLAB_HWCACHE_ALIGN,
|
||||||
NULL,
|
|
||||||
NULL);
|
NULL);
|
||||||
if (!ib_mad_cache) {
|
if (!ib_mad_cache) {
|
||||||
printk(KERN_ERR PFX "Couldn't create ib_mad cache\n");
|
printk(KERN_ERR PFX "Couldn't create ib_mad cache\n");
|
||||||
|
|
|
@ -85,7 +85,7 @@ int vq_init(struct c2_dev *c2dev)
|
||||||
(char) ('0' + c2dev->devnum));
|
(char) ('0' + c2dev->devnum));
|
||||||
c2dev->host_msg_cache =
|
c2dev->host_msg_cache =
|
||||||
kmem_cache_create(c2dev->vq_cache_name, c2dev->rep_vq.msg_size, 0,
|
kmem_cache_create(c2dev->vq_cache_name, c2dev->rep_vq.msg_size, 0,
|
||||||
SLAB_HWCACHE_ALIGN, NULL, NULL);
|
SLAB_HWCACHE_ALIGN, NULL);
|
||||||
if (c2dev->host_msg_cache == NULL) {
|
if (c2dev->host_msg_cache == NULL) {
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
|
@ -259,7 +259,7 @@ int ehca_init_av_cache(void)
|
||||||
av_cache = kmem_cache_create("ehca_cache_av",
|
av_cache = kmem_cache_create("ehca_cache_av",
|
||||||
sizeof(struct ehca_av), 0,
|
sizeof(struct ehca_av), 0,
|
||||||
SLAB_HWCACHE_ALIGN,
|
SLAB_HWCACHE_ALIGN,
|
||||||
NULL, NULL);
|
NULL);
|
||||||
if (!av_cache)
|
if (!av_cache)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -387,7 +387,7 @@ int ehca_init_cq_cache(void)
|
||||||
cq_cache = kmem_cache_create("ehca_cache_cq",
|
cq_cache = kmem_cache_create("ehca_cache_cq",
|
||||||
sizeof(struct ehca_cq), 0,
|
sizeof(struct ehca_cq), 0,
|
||||||
SLAB_HWCACHE_ALIGN,
|
SLAB_HWCACHE_ALIGN,
|
||||||
NULL, NULL);
|
NULL);
|
||||||
if (!cq_cache)
|
if (!cq_cache)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -163,7 +163,7 @@ static int ehca_create_slab_caches(void)
|
||||||
ctblk_cache = kmem_cache_create("ehca_cache_ctblk",
|
ctblk_cache = kmem_cache_create("ehca_cache_ctblk",
|
||||||
EHCA_PAGESIZE, H_CB_ALIGNMENT,
|
EHCA_PAGESIZE, H_CB_ALIGNMENT,
|
||||||
SLAB_HWCACHE_ALIGN,
|
SLAB_HWCACHE_ALIGN,
|
||||||
NULL, NULL);
|
NULL);
|
||||||
if (!ctblk_cache) {
|
if (!ctblk_cache) {
|
||||||
ehca_gen_err("Cannot create ctblk SLAB cache.");
|
ehca_gen_err("Cannot create ctblk SLAB cache.");
|
||||||
ehca_cleanup_mrmw_cache();
|
ehca_cleanup_mrmw_cache();
|
||||||
|
|
|
@ -1950,13 +1950,13 @@ int ehca_init_mrmw_cache(void)
|
||||||
mr_cache = kmem_cache_create("ehca_cache_mr",
|
mr_cache = kmem_cache_create("ehca_cache_mr",
|
||||||
sizeof(struct ehca_mr), 0,
|
sizeof(struct ehca_mr), 0,
|
||||||
SLAB_HWCACHE_ALIGN,
|
SLAB_HWCACHE_ALIGN,
|
||||||
NULL, NULL);
|
NULL);
|
||||||
if (!mr_cache)
|
if (!mr_cache)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
mw_cache = kmem_cache_create("ehca_cache_mw",
|
mw_cache = kmem_cache_create("ehca_cache_mw",
|
||||||
sizeof(struct ehca_mw), 0,
|
sizeof(struct ehca_mw), 0,
|
||||||
SLAB_HWCACHE_ALIGN,
|
SLAB_HWCACHE_ALIGN,
|
||||||
NULL, NULL);
|
NULL);
|
||||||
if (!mw_cache) {
|
if (!mw_cache) {
|
||||||
kmem_cache_destroy(mr_cache);
|
kmem_cache_destroy(mr_cache);
|
||||||
mr_cache = NULL;
|
mr_cache = NULL;
|
||||||
|
|
|
@ -100,7 +100,7 @@ int ehca_init_pd_cache(void)
|
||||||
pd_cache = kmem_cache_create("ehca_cache_pd",
|
pd_cache = kmem_cache_create("ehca_cache_pd",
|
||||||
sizeof(struct ehca_pd), 0,
|
sizeof(struct ehca_pd), 0,
|
||||||
SLAB_HWCACHE_ALIGN,
|
SLAB_HWCACHE_ALIGN,
|
||||||
NULL, NULL);
|
NULL);
|
||||||
if (!pd_cache)
|
if (!pd_cache)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -1760,7 +1760,7 @@ int ehca_init_qp_cache(void)
|
||||||
qp_cache = kmem_cache_create("ehca_cache_qp",
|
qp_cache = kmem_cache_create("ehca_cache_qp",
|
||||||
sizeof(struct ehca_qp), 0,
|
sizeof(struct ehca_qp), 0,
|
||||||
SLAB_HWCACHE_ALIGN,
|
SLAB_HWCACHE_ALIGN,
|
||||||
NULL, NULL);
|
NULL);
|
||||||
if (!qp_cache)
|
if (!qp_cache)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -637,7 +637,7 @@ static int __init iser_init(void)
|
||||||
ig.desc_cache = kmem_cache_create("iser_descriptors",
|
ig.desc_cache = kmem_cache_create("iser_descriptors",
|
||||||
sizeof (struct iser_desc),
|
sizeof (struct iser_desc),
|
||||||
0, SLAB_HWCACHE_ALIGN,
|
0, SLAB_HWCACHE_ALIGN,
|
||||||
NULL, NULL);
|
NULL);
|
||||||
if (ig.desc_cache == NULL)
|
if (ig.desc_cache == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
|
@ -1332,24 +1332,24 @@ int kvm_mmu_module_init(void)
|
||||||
{
|
{
|
||||||
pte_chain_cache = kmem_cache_create("kvm_pte_chain",
|
pte_chain_cache = kmem_cache_create("kvm_pte_chain",
|
||||||
sizeof(struct kvm_pte_chain),
|
sizeof(struct kvm_pte_chain),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (!pte_chain_cache)
|
if (!pte_chain_cache)
|
||||||
goto nomem;
|
goto nomem;
|
||||||
rmap_desc_cache = kmem_cache_create("kvm_rmap_desc",
|
rmap_desc_cache = kmem_cache_create("kvm_rmap_desc",
|
||||||
sizeof(struct kvm_rmap_desc),
|
sizeof(struct kvm_rmap_desc),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (!rmap_desc_cache)
|
if (!rmap_desc_cache)
|
||||||
goto nomem;
|
goto nomem;
|
||||||
|
|
||||||
mmu_page_cache = kmem_cache_create("kvm_mmu_page",
|
mmu_page_cache = kmem_cache_create("kvm_mmu_page",
|
||||||
PAGE_SIZE,
|
PAGE_SIZE,
|
||||||
PAGE_SIZE, 0, NULL, NULL);
|
PAGE_SIZE, 0, NULL);
|
||||||
if (!mmu_page_cache)
|
if (!mmu_page_cache)
|
||||||
goto nomem;
|
goto nomem;
|
||||||
|
|
||||||
mmu_page_header_cache = kmem_cache_create("kvm_mmu_page_header",
|
mmu_page_header_cache = kmem_cache_create("kvm_mmu_page_header",
|
||||||
sizeof(struct kvm_mmu_page),
|
sizeof(struct kvm_mmu_page),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (!mmu_page_header_cache)
|
if (!mmu_page_header_cache)
|
||||||
goto nomem;
|
goto nomem;
|
||||||
|
|
||||||
|
|
|
@ -951,7 +951,7 @@ static int grow_stripes(raid5_conf_t *conf, int num)
|
||||||
conf->active_name = 0;
|
conf->active_name = 0;
|
||||||
sc = kmem_cache_create(conf->cache_name[conf->active_name],
|
sc = kmem_cache_create(conf->cache_name[conf->active_name],
|
||||||
sizeof(struct stripe_head)+(devs-1)*sizeof(struct r5dev),
|
sizeof(struct stripe_head)+(devs-1)*sizeof(struct r5dev),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (!sc)
|
if (!sc)
|
||||||
return 1;
|
return 1;
|
||||||
conf->slab_cache = sc;
|
conf->slab_cache = sc;
|
||||||
|
@ -1003,7 +1003,7 @@ static int resize_stripes(raid5_conf_t *conf, int newsize)
|
||||||
/* Step 1 */
|
/* Step 1 */
|
||||||
sc = kmem_cache_create(conf->cache_name[1-conf->active_name],
|
sc = kmem_cache_create(conf->cache_name[1-conf->active_name],
|
||||||
sizeof(struct stripe_head)+(newsize-1)*sizeof(struct r5dev),
|
sizeof(struct stripe_head)+(newsize-1)*sizeof(struct r5dev),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (!sc)
|
if (!sc)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
|
@ -1171,8 +1171,7 @@ static int __init i2o_block_init(void)
|
||||||
/* Allocate request mempool and slab */
|
/* Allocate request mempool and slab */
|
||||||
size = sizeof(struct i2o_block_request);
|
size = sizeof(struct i2o_block_request);
|
||||||
i2o_blk_req_pool.slab = kmem_cache_create("i2o_block_req", size, 0,
|
i2o_blk_req_pool.slab = kmem_cache_create("i2o_block_req", size, 0,
|
||||||
SLAB_HWCACHE_ALIGN, NULL,
|
SLAB_HWCACHE_ALIGN, NULL);
|
||||||
NULL);
|
|
||||||
if (!i2o_blk_req_pool.slab) {
|
if (!i2o_blk_req_pool.slab) {
|
||||||
osm_err("can't init request slab\n");
|
osm_err("can't init request slab\n");
|
||||||
rc = -ENOMEM;
|
rc = -ENOMEM;
|
||||||
|
|
|
@ -1149,7 +1149,7 @@ int ubi_eba_init_scan(struct ubi_device *ubi, struct ubi_scan_info *si)
|
||||||
if (ubi_devices_cnt == 0) {
|
if (ubi_devices_cnt == 0) {
|
||||||
ltree_slab = kmem_cache_create("ubi_ltree_slab",
|
ltree_slab = kmem_cache_create("ubi_ltree_slab",
|
||||||
sizeof(struct ltree_entry), 0,
|
sizeof(struct ltree_entry), 0,
|
||||||
0, <ree_entry_ctor, NULL);
|
0, <ree_entry_ctor);
|
||||||
if (!ltree_slab)
|
if (!ltree_slab)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1452,7 +1452,7 @@ int ubi_wl_init_scan(struct ubi_device *ubi, struct ubi_scan_info *si)
|
||||||
if (ubi_devices_cnt == 0) {
|
if (ubi_devices_cnt == 0) {
|
||||||
wl_entries_slab = kmem_cache_create("ubi_wl_entry_slab",
|
wl_entries_slab = kmem_cache_create("ubi_wl_entry_slab",
|
||||||
sizeof(struct ubi_wl_entry),
|
sizeof(struct ubi_wl_entry),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (!wl_entries_slab)
|
if (!wl_entries_slab)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
|
@ -291,7 +291,7 @@ dasd_parse_keyword( char *parsestring ) {
|
||||||
dasd_page_cache =
|
dasd_page_cache =
|
||||||
kmem_cache_create("dasd_page_cache", PAGE_SIZE,
|
kmem_cache_create("dasd_page_cache", PAGE_SIZE,
|
||||||
PAGE_SIZE, SLAB_CACHE_DMA,
|
PAGE_SIZE, SLAB_CACHE_DMA,
|
||||||
NULL, NULL );
|
NULL);
|
||||||
if (!dasd_page_cache)
|
if (!dasd_page_cache)
|
||||||
MESSAGE(KERN_WARNING, "%s", "Failed to create slab, "
|
MESSAGE(KERN_WARNING, "%s", "Failed to create slab, "
|
||||||
"fixed buffer mode disabled.");
|
"fixed buffer mode disabled.");
|
||||||
|
|
|
@ -259,21 +259,21 @@ zfcp_module_init(void)
|
||||||
size = sizeof(struct zfcp_fsf_req_qtcb);
|
size = sizeof(struct zfcp_fsf_req_qtcb);
|
||||||
align = calc_alignment(size);
|
align = calc_alignment(size);
|
||||||
zfcp_data.fsf_req_qtcb_cache =
|
zfcp_data.fsf_req_qtcb_cache =
|
||||||
kmem_cache_create("zfcp_fsf", size, align, 0, NULL, NULL);
|
kmem_cache_create("zfcp_fsf", size, align, 0, NULL);
|
||||||
if (!zfcp_data.fsf_req_qtcb_cache)
|
if (!zfcp_data.fsf_req_qtcb_cache)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
size = sizeof(struct fsf_status_read_buffer);
|
size = sizeof(struct fsf_status_read_buffer);
|
||||||
align = calc_alignment(size);
|
align = calc_alignment(size);
|
||||||
zfcp_data.sr_buffer_cache =
|
zfcp_data.sr_buffer_cache =
|
||||||
kmem_cache_create("zfcp_sr", size, align, 0, NULL, NULL);
|
kmem_cache_create("zfcp_sr", size, align, 0, NULL);
|
||||||
if (!zfcp_data.sr_buffer_cache)
|
if (!zfcp_data.sr_buffer_cache)
|
||||||
goto out_sr_cache;
|
goto out_sr_cache;
|
||||||
|
|
||||||
size = sizeof(struct zfcp_gid_pn_data);
|
size = sizeof(struct zfcp_gid_pn_data);
|
||||||
align = calc_alignment(size);
|
align = calc_alignment(size);
|
||||||
zfcp_data.gid_pn_cache =
|
zfcp_data.gid_pn_cache =
|
||||||
kmem_cache_create("zfcp_gid", size, align, 0, NULL, NULL);
|
kmem_cache_create("zfcp_gid", size, align, 0, NULL);
|
||||||
if (!zfcp_data.gid_pn_cache)
|
if (!zfcp_data.gid_pn_cache)
|
||||||
goto out_gid_cache;
|
goto out_gid_cache;
|
||||||
|
|
||||||
|
|
|
@ -462,7 +462,7 @@ static int asd_create_global_caches(void)
|
||||||
sizeof(struct asd_dma_tok),
|
sizeof(struct asd_dma_tok),
|
||||||
0,
|
0,
|
||||||
SLAB_HWCACHE_ALIGN,
|
SLAB_HWCACHE_ALIGN,
|
||||||
NULL, NULL);
|
NULL);
|
||||||
if (!asd_dma_token_cache) {
|
if (!asd_dma_token_cache) {
|
||||||
asd_printk("couldn't create dma token cache\n");
|
asd_printk("couldn't create dma token cache\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@ -474,7 +474,7 @@ static int asd_create_global_caches(void)
|
||||||
sizeof(struct asd_ascb),
|
sizeof(struct asd_ascb),
|
||||||
0,
|
0,
|
||||||
SLAB_HWCACHE_ALIGN,
|
SLAB_HWCACHE_ALIGN,
|
||||||
NULL, NULL);
|
NULL);
|
||||||
if (!asd_ascb_cache) {
|
if (!asd_ascb_cache) {
|
||||||
asd_printk("couldn't create ascb cache\n");
|
asd_printk("couldn't create ascb cache\n");
|
||||||
goto Err;
|
goto Err;
|
||||||
|
|
|
@ -292,7 +292,7 @@ EXPORT_SYMBOL_GPL(sas_domain_release_transport);
|
||||||
static int __init sas_class_init(void)
|
static int __init sas_class_init(void)
|
||||||
{
|
{
|
||||||
sas_task_cache = kmem_cache_create("sas_task", sizeof(struct sas_task),
|
sas_task_cache = kmem_cache_create("sas_task", sizeof(struct sas_task),
|
||||||
0, SLAB_HWCACHE_ALIGN, NULL, NULL);
|
0, SLAB_HWCACHE_ALIGN, NULL);
|
||||||
if (!sas_task_cache)
|
if (!sas_task_cache)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
|
@ -2723,7 +2723,7 @@ qla2x00_module_init(void)
|
||||||
|
|
||||||
/* Allocate cache for SRBs. */
|
/* Allocate cache for SRBs. */
|
||||||
srb_cachep = kmem_cache_create("qla2xxx_srbs", sizeof(srb_t), 0,
|
srb_cachep = kmem_cache_create("qla2xxx_srbs", sizeof(srb_t), 0,
|
||||||
SLAB_HWCACHE_ALIGN, NULL, NULL);
|
SLAB_HWCACHE_ALIGN, NULL);
|
||||||
if (srb_cachep == NULL) {
|
if (srb_cachep == NULL) {
|
||||||
printk(KERN_ERR
|
printk(KERN_ERR
|
||||||
"qla2xxx: Unable to allocate SRB cache...Failing load!\n");
|
"qla2xxx: Unable to allocate SRB cache...Failing load!\n");
|
||||||
|
|
|
@ -1677,7 +1677,7 @@ static int __init qla4xxx_module_init(void)
|
||||||
|
|
||||||
/* Allocate cache for SRBs. */
|
/* Allocate cache for SRBs. */
|
||||||
srb_cachep = kmem_cache_create("qla4xxx_srbs", sizeof(struct srb), 0,
|
srb_cachep = kmem_cache_create("qla4xxx_srbs", sizeof(struct srb), 0,
|
||||||
SLAB_HWCACHE_ALIGN, NULL, NULL);
|
SLAB_HWCACHE_ALIGN, NULL);
|
||||||
if (srb_cachep == NULL) {
|
if (srb_cachep == NULL) {
|
||||||
printk(KERN_ERR
|
printk(KERN_ERR
|
||||||
"%s: Unable to allocate SRB cache..."
|
"%s: Unable to allocate SRB cache..."
|
||||||
|
|
|
@ -288,7 +288,7 @@ int scsi_setup_command_freelist(struct Scsi_Host *shost)
|
||||||
if (!pool->users) {
|
if (!pool->users) {
|
||||||
pool->slab = kmem_cache_create(pool->name,
|
pool->slab = kmem_cache_create(pool->name,
|
||||||
sizeof(struct scsi_cmnd), 0,
|
sizeof(struct scsi_cmnd), 0,
|
||||||
pool->slab_flags, NULL, NULL);
|
pool->slab_flags, NULL);
|
||||||
if (!pool->slab)
|
if (!pool->slab)
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1661,7 +1661,7 @@ int __init scsi_init_queue(void)
|
||||||
|
|
||||||
scsi_io_context_cache = kmem_cache_create("scsi_io_context",
|
scsi_io_context_cache = kmem_cache_create("scsi_io_context",
|
||||||
sizeof(struct scsi_io_context),
|
sizeof(struct scsi_io_context),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (!scsi_io_context_cache) {
|
if (!scsi_io_context_cache) {
|
||||||
printk(KERN_ERR "SCSI: can't init scsi io context cache\n");
|
printk(KERN_ERR "SCSI: can't init scsi io context cache\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@ -1672,7 +1672,7 @@ int __init scsi_init_queue(void)
|
||||||
int size = sgp->size * sizeof(struct scatterlist);
|
int size = sgp->size * sizeof(struct scatterlist);
|
||||||
|
|
||||||
sgp->slab = kmem_cache_create(sgp->name, size, 0,
|
sgp->slab = kmem_cache_create(sgp->name, size, 0,
|
||||||
SLAB_HWCACHE_ALIGN, NULL, NULL);
|
SLAB_HWCACHE_ALIGN, NULL);
|
||||||
if (!sgp->slab) {
|
if (!sgp->slab) {
|
||||||
printk(KERN_ERR "SCSI: can't init sg slab %s\n",
|
printk(KERN_ERR "SCSI: can't init sg slab %s\n",
|
||||||
sgp->name);
|
sgp->name);
|
||||||
|
|
|
@ -585,7 +585,7 @@ static int __init scsi_tgt_init(void)
|
||||||
|
|
||||||
scsi_tgt_cmd_cache = kmem_cache_create("scsi_tgt_cmd",
|
scsi_tgt_cmd_cache = kmem_cache_create("scsi_tgt_cmd",
|
||||||
sizeof(struct scsi_tgt_cmd),
|
sizeof(struct scsi_tgt_cmd),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (!scsi_tgt_cmd_cache)
|
if (!scsi_tgt_cmd_cache)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
|
@ -933,7 +933,7 @@ static int __init uhci_hcd_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
uhci_up_cachep = kmem_cache_create("uhci_urb_priv",
|
uhci_up_cachep = kmem_cache_create("uhci_urb_priv",
|
||||||
sizeof(struct urb_priv), 0, 0, NULL, NULL);
|
sizeof(struct urb_priv), 0, 0, NULL);
|
||||||
if (!uhci_up_cachep)
|
if (!uhci_up_cachep)
|
||||||
goto up_failed;
|
goto up_failed;
|
||||||
|
|
||||||
|
|
|
@ -340,7 +340,7 @@ static int mon_text_open(struct inode *inode, struct file *file)
|
||||||
snprintf(rp->slab_name, SLAB_NAME_SZ, "mon_text_%p", rp);
|
snprintf(rp->slab_name, SLAB_NAME_SZ, "mon_text_%p", rp);
|
||||||
rp->e_slab = kmem_cache_create(rp->slab_name,
|
rp->e_slab = kmem_cache_create(rp->slab_name,
|
||||||
sizeof(struct mon_event_text), sizeof(long), 0,
|
sizeof(struct mon_event_text), sizeof(long), 0,
|
||||||
mon_text_ctor, NULL);
|
mon_text_ctor);
|
||||||
if (rp->e_slab == NULL) {
|
if (rp->e_slab == NULL) {
|
||||||
rc = -ENOMEM;
|
rc = -ENOMEM;
|
||||||
goto err_slab;
|
goto err_slab;
|
||||||
|
|
|
@ -241,7 +241,7 @@ static int init_inodecache(void)
|
||||||
sizeof(struct adfs_inode_info),
|
sizeof(struct adfs_inode_info),
|
||||||
0, (SLAB_RECLAIM_ACCOUNT|
|
0, (SLAB_RECLAIM_ACCOUNT|
|
||||||
SLAB_MEM_SPREAD),
|
SLAB_MEM_SPREAD),
|
||||||
init_once, NULL);
|
init_once);
|
||||||
if (adfs_inode_cachep == NULL)
|
if (adfs_inode_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -99,7 +99,7 @@ static int init_inodecache(void)
|
||||||
sizeof(struct affs_inode_info),
|
sizeof(struct affs_inode_info),
|
||||||
0, (SLAB_RECLAIM_ACCOUNT|
|
0, (SLAB_RECLAIM_ACCOUNT|
|
||||||
SLAB_MEM_SPREAD),
|
SLAB_MEM_SPREAD),
|
||||||
init_once, NULL);
|
init_once);
|
||||||
if (affs_inode_cachep == NULL)
|
if (affs_inode_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -89,8 +89,7 @@ int __init afs_fs_init(void)
|
||||||
sizeof(struct afs_vnode),
|
sizeof(struct afs_vnode),
|
||||||
0,
|
0,
|
||||||
SLAB_HWCACHE_ALIGN,
|
SLAB_HWCACHE_ALIGN,
|
||||||
afs_i_init_once,
|
afs_i_init_once);
|
||||||
NULL);
|
|
||||||
if (!afs_inode_cachep) {
|
if (!afs_inode_cachep) {
|
||||||
printk(KERN_NOTICE "kAFS: Failed to allocate inode cache\n");
|
printk(KERN_NOTICE "kAFS: Failed to allocate inode cache\n");
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -424,7 +424,7 @@ befs_init_inodecache(void)
|
||||||
sizeof (struct befs_inode_info),
|
sizeof (struct befs_inode_info),
|
||||||
0, (SLAB_RECLAIM_ACCOUNT|
|
0, (SLAB_RECLAIM_ACCOUNT|
|
||||||
SLAB_MEM_SPREAD),
|
SLAB_MEM_SPREAD),
|
||||||
init_once, NULL);
|
init_once);
|
||||||
if (befs_inode_cachep == NULL) {
|
if (befs_inode_cachep == NULL) {
|
||||||
printk(KERN_ERR "befs_init_inodecache: "
|
printk(KERN_ERR "befs_init_inodecache: "
|
||||||
"Couldn't initalize inode slabcache\n");
|
"Couldn't initalize inode slabcache\n");
|
||||||
|
|
|
@ -257,7 +257,7 @@ static int init_inodecache(void)
|
||||||
sizeof(struct bfs_inode_info),
|
sizeof(struct bfs_inode_info),
|
||||||
0, (SLAB_RECLAIM_ACCOUNT|
|
0, (SLAB_RECLAIM_ACCOUNT|
|
||||||
SLAB_MEM_SPREAD),
|
SLAB_MEM_SPREAD),
|
||||||
init_once, NULL);
|
init_once);
|
||||||
if (bfs_inode_cachep == NULL)
|
if (bfs_inode_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
2
fs/bio.c
2
fs/bio.c
|
@ -1187,7 +1187,7 @@ static void __init biovec_init_slabs(void)
|
||||||
|
|
||||||
size = bvs->nr_vecs * sizeof(struct bio_vec);
|
size = bvs->nr_vecs * sizeof(struct bio_vec);
|
||||||
bvs->slab = kmem_cache_create(bvs->name, size, 0,
|
bvs->slab = kmem_cache_create(bvs->name, size, 0,
|
||||||
SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL);
|
SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -517,7 +517,7 @@ void __init bdev_cache_init(void)
|
||||||
bdev_cachep = kmem_cache_create("bdev_cache", sizeof(struct bdev_inode),
|
bdev_cachep = kmem_cache_create("bdev_cache", sizeof(struct bdev_inode),
|
||||||
0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
|
0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
|
||||||
SLAB_MEM_SPREAD|SLAB_PANIC),
|
SLAB_MEM_SPREAD|SLAB_PANIC),
|
||||||
init_once, NULL);
|
init_once);
|
||||||
err = register_filesystem(&bd_type);
|
err = register_filesystem(&bd_type);
|
||||||
if (err)
|
if (err)
|
||||||
panic("Cannot register bdev pseudo-fs");
|
panic("Cannot register bdev pseudo-fs");
|
||||||
|
|
|
@ -719,7 +719,7 @@ cifs_init_inodecache(void)
|
||||||
sizeof (struct cifsInodeInfo),
|
sizeof (struct cifsInodeInfo),
|
||||||
0, (SLAB_RECLAIM_ACCOUNT|
|
0, (SLAB_RECLAIM_ACCOUNT|
|
||||||
SLAB_MEM_SPREAD),
|
SLAB_MEM_SPREAD),
|
||||||
cifs_init_once, NULL);
|
cifs_init_once);
|
||||||
if (cifs_inode_cachep == NULL)
|
if (cifs_inode_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -748,7 +748,7 @@ cifs_init_request_bufs(void)
|
||||||
cifs_req_cachep = kmem_cache_create("cifs_request",
|
cifs_req_cachep = kmem_cache_create("cifs_request",
|
||||||
CIFSMaxBufSize +
|
CIFSMaxBufSize +
|
||||||
MAX_CIFS_HDR_SIZE, 0,
|
MAX_CIFS_HDR_SIZE, 0,
|
||||||
SLAB_HWCACHE_ALIGN, NULL, NULL);
|
SLAB_HWCACHE_ALIGN, NULL);
|
||||||
if (cifs_req_cachep == NULL)
|
if (cifs_req_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -776,7 +776,7 @@ cifs_init_request_bufs(void)
|
||||||
alloc of large cifs buffers even when page debugging is on */
|
alloc of large cifs buffers even when page debugging is on */
|
||||||
cifs_sm_req_cachep = kmem_cache_create("cifs_small_rq",
|
cifs_sm_req_cachep = kmem_cache_create("cifs_small_rq",
|
||||||
MAX_CIFS_SMALL_BUFFER_SIZE, 0, SLAB_HWCACHE_ALIGN,
|
MAX_CIFS_SMALL_BUFFER_SIZE, 0, SLAB_HWCACHE_ALIGN,
|
||||||
NULL, NULL);
|
NULL);
|
||||||
if (cifs_sm_req_cachep == NULL) {
|
if (cifs_sm_req_cachep == NULL) {
|
||||||
mempool_destroy(cifs_req_poolp);
|
mempool_destroy(cifs_req_poolp);
|
||||||
kmem_cache_destroy(cifs_req_cachep);
|
kmem_cache_destroy(cifs_req_cachep);
|
||||||
|
@ -817,7 +817,7 @@ cifs_init_mids(void)
|
||||||
{
|
{
|
||||||
cifs_mid_cachep = kmem_cache_create("cifs_mpx_ids",
|
cifs_mid_cachep = kmem_cache_create("cifs_mpx_ids",
|
||||||
sizeof (struct mid_q_entry), 0,
|
sizeof (struct mid_q_entry), 0,
|
||||||
SLAB_HWCACHE_ALIGN, NULL, NULL);
|
SLAB_HWCACHE_ALIGN, NULL);
|
||||||
if (cifs_mid_cachep == NULL)
|
if (cifs_mid_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -830,7 +830,7 @@ cifs_init_mids(void)
|
||||||
|
|
||||||
cifs_oplock_cachep = kmem_cache_create("cifs_oplock_structs",
|
cifs_oplock_cachep = kmem_cache_create("cifs_oplock_structs",
|
||||||
sizeof (struct oplock_q_entry), 0,
|
sizeof (struct oplock_q_entry), 0,
|
||||||
SLAB_HWCACHE_ALIGN, NULL, NULL);
|
SLAB_HWCACHE_ALIGN, NULL);
|
||||||
if (cifs_oplock_cachep == NULL) {
|
if (cifs_oplock_cachep == NULL) {
|
||||||
mempool_destroy(cifs_mid_poolp);
|
mempool_destroy(cifs_mid_poolp);
|
||||||
kmem_cache_destroy(cifs_mid_cachep);
|
kmem_cache_destroy(cifs_mid_cachep);
|
||||||
|
|
|
@ -70,7 +70,7 @@ int coda_init_inodecache(void)
|
||||||
coda_inode_cachep = kmem_cache_create("coda_inode_cache",
|
coda_inode_cachep = kmem_cache_create("coda_inode_cache",
|
||||||
sizeof(struct coda_inode_info),
|
sizeof(struct coda_inode_info),
|
||||||
0, SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD,
|
0, SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD,
|
||||||
init_once, NULL);
|
init_once);
|
||||||
if (coda_inode_cachep == NULL)
|
if (coda_inode_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -136,7 +136,7 @@ static int __init configfs_init(void)
|
||||||
|
|
||||||
configfs_dir_cachep = kmem_cache_create("configfs_dir_cache",
|
configfs_dir_cachep = kmem_cache_create("configfs_dir_cache",
|
||||||
sizeof(struct configfs_dirent),
|
sizeof(struct configfs_dirent),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (!configfs_dir_cachep)
|
if (!configfs_dir_cachep)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
|
|
@ -2165,10 +2165,10 @@ void __init vfs_caches_init(unsigned long mempages)
|
||||||
mempages -= reserve;
|
mempages -= reserve;
|
||||||
|
|
||||||
names_cachep = kmem_cache_create("names_cache", PATH_MAX, 0,
|
names_cachep = kmem_cache_create("names_cache", PATH_MAX, 0,
|
||||||
SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL);
|
SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);
|
||||||
|
|
||||||
filp_cachep = kmem_cache_create("filp", sizeof(struct file), 0,
|
filp_cachep = kmem_cache_create("filp", sizeof(struct file), 0,
|
||||||
SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL);
|
SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);
|
||||||
|
|
||||||
dcache_init(mempages);
|
dcache_init(mempages);
|
||||||
inode_init(mempages);
|
inode_init(mempages);
|
||||||
|
|
|
@ -205,7 +205,7 @@ static int dcookie_init(void)
|
||||||
|
|
||||||
dcookie_cache = kmem_cache_create("dcookie_cache",
|
dcookie_cache = kmem_cache_create("dcookie_cache",
|
||||||
sizeof(struct dcookie_struct),
|
sizeof(struct dcookie_struct),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
|
|
||||||
if (!dcookie_cache)
|
if (!dcookie_cache)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
@ -1449,7 +1449,7 @@ int dlm_lowcomms_start(void)
|
||||||
error = -ENOMEM;
|
error = -ENOMEM;
|
||||||
con_cache = kmem_cache_create("dlm_conn", sizeof(struct connection),
|
con_cache = kmem_cache_create("dlm_conn", sizeof(struct connection),
|
||||||
__alignof__(struct connection), 0,
|
__alignof__(struct connection), 0,
|
||||||
NULL, NULL);
|
NULL);
|
||||||
if (!con_cache)
|
if (!con_cache)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ int dlm_memory_init(void)
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
lkb_cache = kmem_cache_create("dlm_lkb", sizeof(struct dlm_lkb),
|
lkb_cache = kmem_cache_create("dlm_lkb", sizeof(struct dlm_lkb),
|
||||||
__alignof__(struct dlm_lkb), 0, NULL, NULL);
|
__alignof__(struct dlm_lkb), 0, NULL);
|
||||||
if (!lkb_cache)
|
if (!lkb_cache)
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -176,7 +176,7 @@ EXPORT_SYMBOL_GPL(dnotify_parent);
|
||||||
static int __init dnotify_init(void)
|
static int __init dnotify_init(void)
|
||||||
{
|
{
|
||||||
dn_cache = kmem_cache_create("dnotify_cache",
|
dn_cache = kmem_cache_create("dnotify_cache",
|
||||||
sizeof(struct dnotify_struct), 0, SLAB_PANIC, NULL, NULL);
|
sizeof(struct dnotify_struct), 0, SLAB_PANIC, NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1852,7 +1852,7 @@ static int __init dquot_init(void)
|
||||||
sizeof(struct dquot), sizeof(unsigned long) * 4,
|
sizeof(struct dquot), sizeof(unsigned long) * 4,
|
||||||
(SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
|
(SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
|
||||||
SLAB_MEM_SPREAD|SLAB_PANIC),
|
SLAB_MEM_SPREAD|SLAB_PANIC),
|
||||||
NULL, NULL);
|
NULL);
|
||||||
|
|
||||||
order = 0;
|
order = 0;
|
||||||
dquot_hash = (struct hlist_head *)__get_free_pages(GFP_ATOMIC, order);
|
dquot_hash = (struct hlist_head *)__get_free_pages(GFP_ATOMIC, order);
|
||||||
|
|
|
@ -677,7 +677,7 @@ static int ecryptfs_init_kmem_caches(void)
|
||||||
|
|
||||||
info = &ecryptfs_cache_infos[i];
|
info = &ecryptfs_cache_infos[i];
|
||||||
*(info->cache) = kmem_cache_create(info->name, info->size,
|
*(info->cache) = kmem_cache_create(info->name, info->size,
|
||||||
0, SLAB_HWCACHE_ALIGN, info->ctor, NULL);
|
0, SLAB_HWCACHE_ALIGN, info->ctor);
|
||||||
if (!*(info->cache)) {
|
if (!*(info->cache)) {
|
||||||
ecryptfs_free_kmem_caches();
|
ecryptfs_free_kmem_caches();
|
||||||
ecryptfs_printk(KERN_WARNING, "%s: "
|
ecryptfs_printk(KERN_WARNING, "%s: "
|
||||||
|
|
|
@ -81,7 +81,7 @@ static int init_inodecache(void)
|
||||||
efs_inode_cachep = kmem_cache_create("efs_inode_cache",
|
efs_inode_cachep = kmem_cache_create("efs_inode_cache",
|
||||||
sizeof(struct efs_inode_info),
|
sizeof(struct efs_inode_info),
|
||||||
0, SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD,
|
0, SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD,
|
||||||
init_once, NULL);
|
init_once);
|
||||||
if (efs_inode_cachep == NULL)
|
if (efs_inode_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -1324,12 +1324,12 @@ static int __init eventpoll_init(void)
|
||||||
/* Allocates slab cache used to allocate "struct epitem" items */
|
/* Allocates slab cache used to allocate "struct epitem" items */
|
||||||
epi_cache = kmem_cache_create("eventpoll_epi", sizeof(struct epitem),
|
epi_cache = kmem_cache_create("eventpoll_epi", sizeof(struct epitem),
|
||||||
0, SLAB_HWCACHE_ALIGN|EPI_SLAB_DEBUG|SLAB_PANIC,
|
0, SLAB_HWCACHE_ALIGN|EPI_SLAB_DEBUG|SLAB_PANIC,
|
||||||
NULL, NULL);
|
NULL);
|
||||||
|
|
||||||
/* Allocates slab cache used to allocate "struct eppoll_entry" */
|
/* Allocates slab cache used to allocate "struct eppoll_entry" */
|
||||||
pwq_cache = kmem_cache_create("eventpoll_pwq",
|
pwq_cache = kmem_cache_create("eventpoll_pwq",
|
||||||
sizeof(struct eppoll_entry), 0,
|
sizeof(struct eppoll_entry), 0,
|
||||||
EPI_SLAB_DEBUG|SLAB_PANIC, NULL, NULL);
|
EPI_SLAB_DEBUG|SLAB_PANIC, NULL);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,7 +174,7 @@ static int init_inodecache(void)
|
||||||
sizeof(struct ext2_inode_info),
|
sizeof(struct ext2_inode_info),
|
||||||
0, (SLAB_RECLAIM_ACCOUNT|
|
0, (SLAB_RECLAIM_ACCOUNT|
|
||||||
SLAB_MEM_SPREAD),
|
SLAB_MEM_SPREAD),
|
||||||
init_once, NULL);
|
init_once);
|
||||||
if (ext2_inode_cachep == NULL)
|
if (ext2_inode_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -490,7 +490,7 @@ static int init_inodecache(void)
|
||||||
sizeof(struct ext3_inode_info),
|
sizeof(struct ext3_inode_info),
|
||||||
0, (SLAB_RECLAIM_ACCOUNT|
|
0, (SLAB_RECLAIM_ACCOUNT|
|
||||||
SLAB_MEM_SPREAD),
|
SLAB_MEM_SPREAD),
|
||||||
init_once, NULL);
|
init_once);
|
||||||
if (ext3_inode_cachep == NULL)
|
if (ext3_inode_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -541,7 +541,7 @@ static int init_inodecache(void)
|
||||||
sizeof(struct ext4_inode_info),
|
sizeof(struct ext4_inode_info),
|
||||||
0, (SLAB_RECLAIM_ACCOUNT|
|
0, (SLAB_RECLAIM_ACCOUNT|
|
||||||
SLAB_MEM_SPREAD),
|
SLAB_MEM_SPREAD),
|
||||||
init_once, NULL);
|
init_once);
|
||||||
if (ext4_inode_cachep == NULL)
|
if (ext4_inode_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -48,7 +48,7 @@ int __init fat_cache_init(void)
|
||||||
fat_cache_cachep = kmem_cache_create("fat_cache",
|
fat_cache_cachep = kmem_cache_create("fat_cache",
|
||||||
sizeof(struct fat_cache),
|
sizeof(struct fat_cache),
|
||||||
0, SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD,
|
0, SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD,
|
||||||
init_once, NULL);
|
init_once);
|
||||||
if (fat_cache_cachep == NULL)
|
if (fat_cache_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -514,7 +514,7 @@ static int __init fat_init_inodecache(void)
|
||||||
sizeof(struct msdos_inode_info),
|
sizeof(struct msdos_inode_info),
|
||||||
0, (SLAB_RECLAIM_ACCOUNT|
|
0, (SLAB_RECLAIM_ACCOUNT|
|
||||||
SLAB_MEM_SPREAD),
|
SLAB_MEM_SPREAD),
|
||||||
init_once, NULL);
|
init_once);
|
||||||
if (fat_inode_cachep == NULL)
|
if (fat_inode_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -638,7 +638,7 @@ EXPORT_SYMBOL(kill_fasync);
|
||||||
static int __init fasync_init(void)
|
static int __init fasync_init(void)
|
||||||
{
|
{
|
||||||
fasync_cache = kmem_cache_create("fasync_cache",
|
fasync_cache = kmem_cache_create("fasync_cache",
|
||||||
sizeof(struct fasync_struct), 0, SLAB_PANIC, NULL, NULL);
|
sizeof(struct fasync_struct), 0, SLAB_PANIC, NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -264,7 +264,7 @@ vxfs_init(void)
|
||||||
|
|
||||||
vxfs_inode_cachep = kmem_cache_create("vxfs_inode",
|
vxfs_inode_cachep = kmem_cache_create("vxfs_inode",
|
||||||
sizeof(struct vxfs_inode_info), 0,
|
sizeof(struct vxfs_inode_info), 0,
|
||||||
SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, NULL, NULL);
|
SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, NULL);
|
||||||
if (!vxfs_inode_cachep)
|
if (!vxfs_inode_cachep)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
rv = register_filesystem(&vxfs_fs_type);
|
rv = register_filesystem(&vxfs_fs_type);
|
||||||
|
|
|
@ -1044,7 +1044,7 @@ int __init fuse_dev_init(void)
|
||||||
int err = -ENOMEM;
|
int err = -ENOMEM;
|
||||||
fuse_req_cachep = kmem_cache_create("fuse_request",
|
fuse_req_cachep = kmem_cache_create("fuse_request",
|
||||||
sizeof(struct fuse_req),
|
sizeof(struct fuse_req),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (!fuse_req_cachep)
|
if (!fuse_req_cachep)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
|
|
@ -706,7 +706,7 @@ static int __init fuse_fs_init(void)
|
||||||
fuse_inode_cachep = kmem_cache_create("fuse_inode",
|
fuse_inode_cachep = kmem_cache_create("fuse_inode",
|
||||||
sizeof(struct fuse_inode),
|
sizeof(struct fuse_inode),
|
||||||
0, SLAB_HWCACHE_ALIGN,
|
0, SLAB_HWCACHE_ALIGN,
|
||||||
fuse_inode_init_once, NULL);
|
fuse_inode_init_once);
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
if (!fuse_inode_cachep)
|
if (!fuse_inode_cachep)
|
||||||
goto out_unreg2;
|
goto out_unreg2;
|
||||||
|
|
|
@ -72,7 +72,7 @@ static int __init init_gfs2_fs(void)
|
||||||
gfs2_glock_cachep = kmem_cache_create("gfs2_glock",
|
gfs2_glock_cachep = kmem_cache_create("gfs2_glock",
|
||||||
sizeof(struct gfs2_glock),
|
sizeof(struct gfs2_glock),
|
||||||
0, 0,
|
0, 0,
|
||||||
gfs2_init_glock_once, NULL);
|
gfs2_init_glock_once);
|
||||||
if (!gfs2_glock_cachep)
|
if (!gfs2_glock_cachep)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
@ -80,13 +80,13 @@ static int __init init_gfs2_fs(void)
|
||||||
sizeof(struct gfs2_inode),
|
sizeof(struct gfs2_inode),
|
||||||
0, SLAB_RECLAIM_ACCOUNT|
|
0, SLAB_RECLAIM_ACCOUNT|
|
||||||
SLAB_MEM_SPREAD,
|
SLAB_MEM_SPREAD,
|
||||||
gfs2_init_inode_once, NULL);
|
gfs2_init_inode_once);
|
||||||
if (!gfs2_inode_cachep)
|
if (!gfs2_inode_cachep)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
gfs2_bufdata_cachep = kmem_cache_create("gfs2_bufdata",
|
gfs2_bufdata_cachep = kmem_cache_create("gfs2_bufdata",
|
||||||
sizeof(struct gfs2_bufdata),
|
sizeof(struct gfs2_bufdata),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (!gfs2_bufdata_cachep)
|
if (!gfs2_bufdata_cachep)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
|
|
@ -443,7 +443,7 @@ static int __init init_hfs_fs(void)
|
||||||
|
|
||||||
hfs_inode_cachep = kmem_cache_create("hfs_inode_cache",
|
hfs_inode_cachep = kmem_cache_create("hfs_inode_cache",
|
||||||
sizeof(struct hfs_inode_info), 0, SLAB_HWCACHE_ALIGN,
|
sizeof(struct hfs_inode_info), 0, SLAB_HWCACHE_ALIGN,
|
||||||
hfs_init_once, NULL);
|
hfs_init_once);
|
||||||
if (!hfs_inode_cachep)
|
if (!hfs_inode_cachep)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
err = register_filesystem(&hfs_fs_type);
|
err = register_filesystem(&hfs_fs_type);
|
||||||
|
|
|
@ -479,7 +479,7 @@ static int __init init_hfsplus_fs(void)
|
||||||
|
|
||||||
hfsplus_inode_cachep = kmem_cache_create("hfsplus_icache",
|
hfsplus_inode_cachep = kmem_cache_create("hfsplus_icache",
|
||||||
HFSPLUS_INODE_SIZE, 0, SLAB_HWCACHE_ALIGN,
|
HFSPLUS_INODE_SIZE, 0, SLAB_HWCACHE_ALIGN,
|
||||||
hfsplus_init_once, NULL);
|
hfsplus_init_once);
|
||||||
if (!hfsplus_inode_cachep)
|
if (!hfsplus_inode_cachep)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
err = register_filesystem(&hfsplus_fs_type);
|
err = register_filesystem(&hfsplus_fs_type);
|
||||||
|
|
|
@ -188,7 +188,7 @@ static int init_inodecache(void)
|
||||||
sizeof(struct hpfs_inode_info),
|
sizeof(struct hpfs_inode_info),
|
||||||
0, (SLAB_RECLAIM_ACCOUNT|
|
0, (SLAB_RECLAIM_ACCOUNT|
|
||||||
SLAB_MEM_SPREAD),
|
SLAB_MEM_SPREAD),
|
||||||
init_once, NULL);
|
init_once);
|
||||||
if (hpfs_inode_cachep == NULL)
|
if (hpfs_inode_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -848,7 +848,7 @@ static int __init init_hugetlbfs_fs(void)
|
||||||
|
|
||||||
hugetlbfs_inode_cachep = kmem_cache_create("hugetlbfs_inode_cache",
|
hugetlbfs_inode_cachep = kmem_cache_create("hugetlbfs_inode_cache",
|
||||||
sizeof(struct hugetlbfs_inode_info),
|
sizeof(struct hugetlbfs_inode_info),
|
||||||
0, 0, init_once, NULL);
|
0, 0, init_once);
|
||||||
if (hugetlbfs_inode_cachep == NULL)
|
if (hugetlbfs_inode_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
|
@ -1388,8 +1388,7 @@ void __init inode_init(unsigned long mempages)
|
||||||
0,
|
0,
|
||||||
(SLAB_RECLAIM_ACCOUNT|SLAB_PANIC|
|
(SLAB_RECLAIM_ACCOUNT|SLAB_PANIC|
|
||||||
SLAB_MEM_SPREAD),
|
SLAB_MEM_SPREAD),
|
||||||
init_once,
|
init_once);
|
||||||
NULL);
|
|
||||||
register_shrinker(&icache_shrinker);
|
register_shrinker(&icache_shrinker);
|
||||||
|
|
||||||
/* Hash may have been set up in inode_init_early */
|
/* Hash may have been set up in inode_init_early */
|
||||||
|
|
|
@ -716,10 +716,10 @@ static int __init inotify_user_setup(void)
|
||||||
|
|
||||||
watch_cachep = kmem_cache_create("inotify_watch_cache",
|
watch_cachep = kmem_cache_create("inotify_watch_cache",
|
||||||
sizeof(struct inotify_user_watch),
|
sizeof(struct inotify_user_watch),
|
||||||
0, SLAB_PANIC, NULL, NULL);
|
0, SLAB_PANIC, NULL);
|
||||||
event_cachep = kmem_cache_create("inotify_event_cache",
|
event_cachep = kmem_cache_create("inotify_event_cache",
|
||||||
sizeof(struct inotify_kernel_event),
|
sizeof(struct inotify_kernel_event),
|
||||||
0, SLAB_PANIC, NULL, NULL);
|
0, SLAB_PANIC, NULL);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ static int init_inodecache(void)
|
||||||
sizeof(struct iso_inode_info),
|
sizeof(struct iso_inode_info),
|
||||||
0, (SLAB_RECLAIM_ACCOUNT|
|
0, (SLAB_RECLAIM_ACCOUNT|
|
||||||
SLAB_MEM_SPREAD),
|
SLAB_MEM_SPREAD),
|
||||||
init_once, NULL);
|
init_once);
|
||||||
if (isofs_inode_cachep == NULL)
|
if (isofs_inode_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -1668,7 +1668,7 @@ static int journal_create_jbd_slab(size_t slab_size)
|
||||||
* boundary.
|
* boundary.
|
||||||
*/
|
*/
|
||||||
jbd_slab[i] = kmem_cache_create(jbd_slab_names[i],
|
jbd_slab[i] = kmem_cache_create(jbd_slab_names[i],
|
||||||
slab_size, slab_size, 0, NULL, NULL);
|
slab_size, slab_size, 0, NULL);
|
||||||
if (!jbd_slab[i]) {
|
if (!jbd_slab[i]) {
|
||||||
printk(KERN_EMERG "JBD: no memory for jbd_slab cache\n");
|
printk(KERN_EMERG "JBD: no memory for jbd_slab cache\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@ -1711,8 +1711,7 @@ static int journal_init_journal_head_cache(void)
|
||||||
sizeof(struct journal_head),
|
sizeof(struct journal_head),
|
||||||
0, /* offset */
|
0, /* offset */
|
||||||
0, /* flags */
|
0, /* flags */
|
||||||
NULL, /* ctor */
|
NULL); /* ctor */
|
||||||
NULL); /* dtor */
|
|
||||||
retval = 0;
|
retval = 0;
|
||||||
if (journal_head_cache == 0) {
|
if (journal_head_cache == 0) {
|
||||||
retval = -ENOMEM;
|
retval = -ENOMEM;
|
||||||
|
@ -2008,8 +2007,7 @@ static int __init journal_init_handle_cache(void)
|
||||||
sizeof(handle_t),
|
sizeof(handle_t),
|
||||||
0, /* offset */
|
0, /* offset */
|
||||||
0, /* flags */
|
0, /* flags */
|
||||||
NULL, /* ctor */
|
NULL); /* ctor */
|
||||||
NULL); /* dtor */
|
|
||||||
if (jbd_handle_cache == NULL) {
|
if (jbd_handle_cache == NULL) {
|
||||||
printk(KERN_EMERG "JBD: failed to create handle cache\n");
|
printk(KERN_EMERG "JBD: failed to create handle cache\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
|
@ -170,13 +170,13 @@ int __init journal_init_revoke_caches(void)
|
||||||
{
|
{
|
||||||
revoke_record_cache = kmem_cache_create("revoke_record",
|
revoke_record_cache = kmem_cache_create("revoke_record",
|
||||||
sizeof(struct jbd_revoke_record_s),
|
sizeof(struct jbd_revoke_record_s),
|
||||||
0, SLAB_HWCACHE_ALIGN, NULL, NULL);
|
0, SLAB_HWCACHE_ALIGN, NULL);
|
||||||
if (revoke_record_cache == 0)
|
if (revoke_record_cache == 0)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
revoke_table_cache = kmem_cache_create("revoke_table",
|
revoke_table_cache = kmem_cache_create("revoke_table",
|
||||||
sizeof(struct jbd_revoke_table_s),
|
sizeof(struct jbd_revoke_table_s),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (revoke_table_cache == 0) {
|
if (revoke_table_cache == 0) {
|
||||||
kmem_cache_destroy(revoke_record_cache);
|
kmem_cache_destroy(revoke_record_cache);
|
||||||
revoke_record_cache = NULL;
|
revoke_record_cache = NULL;
|
||||||
|
|
|
@ -1680,7 +1680,7 @@ static int jbd2_journal_create_jbd_slab(size_t slab_size)
|
||||||
* boundary.
|
* boundary.
|
||||||
*/
|
*/
|
||||||
jbd_slab[i] = kmem_cache_create(jbd_slab_names[i],
|
jbd_slab[i] = kmem_cache_create(jbd_slab_names[i],
|
||||||
slab_size, slab_size, 0, NULL, NULL);
|
slab_size, slab_size, 0, NULL);
|
||||||
if (!jbd_slab[i]) {
|
if (!jbd_slab[i]) {
|
||||||
printk(KERN_EMERG "JBD: no memory for jbd_slab cache\n");
|
printk(KERN_EMERG "JBD: no memory for jbd_slab cache\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
@ -1723,8 +1723,7 @@ static int journal_init_jbd2_journal_head_cache(void)
|
||||||
sizeof(struct journal_head),
|
sizeof(struct journal_head),
|
||||||
0, /* offset */
|
0, /* offset */
|
||||||
0, /* flags */
|
0, /* flags */
|
||||||
NULL, /* ctor */
|
NULL); /* ctor */
|
||||||
NULL); /* dtor */
|
|
||||||
retval = 0;
|
retval = 0;
|
||||||
if (jbd2_journal_head_cache == 0) {
|
if (jbd2_journal_head_cache == 0) {
|
||||||
retval = -ENOMEM;
|
retval = -ENOMEM;
|
||||||
|
@ -2006,8 +2005,7 @@ static int __init journal_init_handle_cache(void)
|
||||||
sizeof(handle_t),
|
sizeof(handle_t),
|
||||||
0, /* offset */
|
0, /* offset */
|
||||||
0, /* flags */
|
0, /* flags */
|
||||||
NULL, /* ctor */
|
NULL); /* ctor */
|
||||||
NULL); /* dtor */
|
|
||||||
if (jbd2_handle_cache == NULL) {
|
if (jbd2_handle_cache == NULL) {
|
||||||
printk(KERN_EMERG "JBD: failed to create handle cache\n");
|
printk(KERN_EMERG "JBD: failed to create handle cache\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
|
@ -171,13 +171,13 @@ int __init jbd2_journal_init_revoke_caches(void)
|
||||||
{
|
{
|
||||||
jbd2_revoke_record_cache = kmem_cache_create("jbd2_revoke_record",
|
jbd2_revoke_record_cache = kmem_cache_create("jbd2_revoke_record",
|
||||||
sizeof(struct jbd2_revoke_record_s),
|
sizeof(struct jbd2_revoke_record_s),
|
||||||
0, SLAB_HWCACHE_ALIGN, NULL, NULL);
|
0, SLAB_HWCACHE_ALIGN, NULL);
|
||||||
if (jbd2_revoke_record_cache == 0)
|
if (jbd2_revoke_record_cache == 0)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
jbd2_revoke_table_cache = kmem_cache_create("jbd2_revoke_table",
|
jbd2_revoke_table_cache = kmem_cache_create("jbd2_revoke_table",
|
||||||
sizeof(struct jbd2_revoke_table_s),
|
sizeof(struct jbd2_revoke_table_s),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (jbd2_revoke_table_cache == 0) {
|
if (jbd2_revoke_table_cache == 0) {
|
||||||
kmem_cache_destroy(jbd2_revoke_record_cache);
|
kmem_cache_destroy(jbd2_revoke_record_cache);
|
||||||
jbd2_revoke_record_cache = NULL;
|
jbd2_revoke_record_cache = NULL;
|
||||||
|
|
|
@ -33,56 +33,56 @@ int __init jffs2_create_slab_caches(void)
|
||||||
{
|
{
|
||||||
full_dnode_slab = kmem_cache_create("jffs2_full_dnode",
|
full_dnode_slab = kmem_cache_create("jffs2_full_dnode",
|
||||||
sizeof(struct jffs2_full_dnode),
|
sizeof(struct jffs2_full_dnode),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (!full_dnode_slab)
|
if (!full_dnode_slab)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
raw_dirent_slab = kmem_cache_create("jffs2_raw_dirent",
|
raw_dirent_slab = kmem_cache_create("jffs2_raw_dirent",
|
||||||
sizeof(struct jffs2_raw_dirent),
|
sizeof(struct jffs2_raw_dirent),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (!raw_dirent_slab)
|
if (!raw_dirent_slab)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
raw_inode_slab = kmem_cache_create("jffs2_raw_inode",
|
raw_inode_slab = kmem_cache_create("jffs2_raw_inode",
|
||||||
sizeof(struct jffs2_raw_inode),
|
sizeof(struct jffs2_raw_inode),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (!raw_inode_slab)
|
if (!raw_inode_slab)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
tmp_dnode_info_slab = kmem_cache_create("jffs2_tmp_dnode",
|
tmp_dnode_info_slab = kmem_cache_create("jffs2_tmp_dnode",
|
||||||
sizeof(struct jffs2_tmp_dnode_info),
|
sizeof(struct jffs2_tmp_dnode_info),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (!tmp_dnode_info_slab)
|
if (!tmp_dnode_info_slab)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
raw_node_ref_slab = kmem_cache_create("jffs2_refblock",
|
raw_node_ref_slab = kmem_cache_create("jffs2_refblock",
|
||||||
sizeof(struct jffs2_raw_node_ref) * (REFS_PER_BLOCK + 1),
|
sizeof(struct jffs2_raw_node_ref) * (REFS_PER_BLOCK + 1),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (!raw_node_ref_slab)
|
if (!raw_node_ref_slab)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
node_frag_slab = kmem_cache_create("jffs2_node_frag",
|
node_frag_slab = kmem_cache_create("jffs2_node_frag",
|
||||||
sizeof(struct jffs2_node_frag),
|
sizeof(struct jffs2_node_frag),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (!node_frag_slab)
|
if (!node_frag_slab)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
inode_cache_slab = kmem_cache_create("jffs2_inode_cache",
|
inode_cache_slab = kmem_cache_create("jffs2_inode_cache",
|
||||||
sizeof(struct jffs2_inode_cache),
|
sizeof(struct jffs2_inode_cache),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (!inode_cache_slab)
|
if (!inode_cache_slab)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
#ifdef CONFIG_JFFS2_FS_XATTR
|
#ifdef CONFIG_JFFS2_FS_XATTR
|
||||||
xattr_datum_cache = kmem_cache_create("jffs2_xattr_datum",
|
xattr_datum_cache = kmem_cache_create("jffs2_xattr_datum",
|
||||||
sizeof(struct jffs2_xattr_datum),
|
sizeof(struct jffs2_xattr_datum),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (!xattr_datum_cache)
|
if (!xattr_datum_cache)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
xattr_ref_cache = kmem_cache_create("jffs2_xattr_ref",
|
xattr_ref_cache = kmem_cache_create("jffs2_xattr_ref",
|
||||||
sizeof(struct jffs2_xattr_ref),
|
sizeof(struct jffs2_xattr_ref),
|
||||||
0, 0, NULL, NULL);
|
0, 0, NULL);
|
||||||
if (!xattr_ref_cache)
|
if (!xattr_ref_cache)
|
||||||
goto err;
|
goto err;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -192,7 +192,7 @@ static int __init init_jffs2_fs(void)
|
||||||
sizeof(struct jffs2_inode_info),
|
sizeof(struct jffs2_inode_info),
|
||||||
0, (SLAB_RECLAIM_ACCOUNT|
|
0, (SLAB_RECLAIM_ACCOUNT|
|
||||||
SLAB_MEM_SPREAD),
|
SLAB_MEM_SPREAD),
|
||||||
jffs2_i_init_once, NULL);
|
jffs2_i_init_once);
|
||||||
if (!jffs2_inode_cachep) {
|
if (!jffs2_inode_cachep) {
|
||||||
printk(KERN_ERR "JFFS2 error: Failed to initialise inode cache\n");
|
printk(KERN_ERR "JFFS2 error: Failed to initialise inode cache\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
|
@ -213,7 +213,7 @@ int __init metapage_init(void)
|
||||||
* Allocate the metapage structures
|
* Allocate the metapage structures
|
||||||
*/
|
*/
|
||||||
metapage_cache = kmem_cache_create("jfs_mp", sizeof(struct metapage),
|
metapage_cache = kmem_cache_create("jfs_mp", sizeof(struct metapage),
|
||||||
0, 0, init_once, NULL);
|
0, 0, init_once);
|
||||||
if (metapage_cache == NULL)
|
if (metapage_cache == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
|
@ -776,7 +776,7 @@ static int __init init_jfs_fs(void)
|
||||||
jfs_inode_cachep =
|
jfs_inode_cachep =
|
||||||
kmem_cache_create("jfs_ip", sizeof(struct jfs_inode_info), 0,
|
kmem_cache_create("jfs_ip", sizeof(struct jfs_inode_info), 0,
|
||||||
SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD,
|
SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD,
|
||||||
init_once, NULL);
|
init_once);
|
||||||
if (jfs_inode_cachep == NULL)
|
if (jfs_inode_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
|
@ -2276,7 +2276,7 @@ static int __init filelock_init(void)
|
||||||
{
|
{
|
||||||
filelock_cache = kmem_cache_create("file_lock_cache",
|
filelock_cache = kmem_cache_create("file_lock_cache",
|
||||||
sizeof(struct file_lock), 0, SLAB_PANIC,
|
sizeof(struct file_lock), 0, SLAB_PANIC,
|
||||||
init_once, NULL);
|
init_once);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -292,7 +292,7 @@ mb_cache_create(const char *name, struct mb_cache_op *cache_op,
|
||||||
INIT_LIST_HEAD(&cache->c_indexes_hash[m][n]);
|
INIT_LIST_HEAD(&cache->c_indexes_hash[m][n]);
|
||||||
}
|
}
|
||||||
cache->c_entry_cache = kmem_cache_create(name, entry_size, 0,
|
cache->c_entry_cache = kmem_cache_create(name, entry_size, 0,
|
||||||
SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, NULL, NULL);
|
SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, NULL);
|
||||||
if (!cache->c_entry_cache)
|
if (!cache->c_entry_cache)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ static int init_inodecache(void)
|
||||||
sizeof(struct minix_inode_info),
|
sizeof(struct minix_inode_info),
|
||||||
0, (SLAB_RECLAIM_ACCOUNT|
|
0, (SLAB_RECLAIM_ACCOUNT|
|
||||||
SLAB_MEM_SPREAD),
|
SLAB_MEM_SPREAD),
|
||||||
init_once, NULL);
|
init_once);
|
||||||
if (minix_inode_cachep == NULL)
|
if (minix_inode_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -1801,7 +1801,7 @@ void __init mnt_init(unsigned long mempages)
|
||||||
init_rwsem(&namespace_sem);
|
init_rwsem(&namespace_sem);
|
||||||
|
|
||||||
mnt_cache = kmem_cache_create("mnt_cache", sizeof(struct vfsmount),
|
mnt_cache = kmem_cache_create("mnt_cache", sizeof(struct vfsmount),
|
||||||
0, SLAB_HWCACHE_ALIGN | SLAB_PANIC, NULL, NULL);
|
0, SLAB_HWCACHE_ALIGN | SLAB_PANIC, NULL);
|
||||||
|
|
||||||
mount_hashtable = (struct list_head *)__get_free_page(GFP_ATOMIC);
|
mount_hashtable = (struct list_head *)__get_free_page(GFP_ATOMIC);
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ static int init_inodecache(void)
|
||||||
sizeof(struct ncp_inode_info),
|
sizeof(struct ncp_inode_info),
|
||||||
0, (SLAB_RECLAIM_ACCOUNT|
|
0, (SLAB_RECLAIM_ACCOUNT|
|
||||||
SLAB_MEM_SPREAD),
|
SLAB_MEM_SPREAD),
|
||||||
init_once, NULL);
|
init_once);
|
||||||
if (ncp_inode_cachep == NULL)
|
if (ncp_inode_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -875,7 +875,7 @@ int __init nfs_init_directcache(void)
|
||||||
sizeof(struct nfs_direct_req),
|
sizeof(struct nfs_direct_req),
|
||||||
0, (SLAB_RECLAIM_ACCOUNT|
|
0, (SLAB_RECLAIM_ACCOUNT|
|
||||||
SLAB_MEM_SPREAD),
|
SLAB_MEM_SPREAD),
|
||||||
NULL, NULL);
|
NULL);
|
||||||
if (nfs_direct_cachep == NULL)
|
if (nfs_direct_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
|
@ -1172,7 +1172,7 @@ static int __init nfs_init_inodecache(void)
|
||||||
sizeof(struct nfs_inode),
|
sizeof(struct nfs_inode),
|
||||||
0, (SLAB_RECLAIM_ACCOUNT|
|
0, (SLAB_RECLAIM_ACCOUNT|
|
||||||
SLAB_MEM_SPREAD),
|
SLAB_MEM_SPREAD),
|
||||||
init_once, NULL);
|
init_once);
|
||||||
if (nfs_inode_cachep == NULL)
|
if (nfs_inode_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
|
@ -442,7 +442,7 @@ int __init nfs_init_nfspagecache(void)
|
||||||
nfs_page_cachep = kmem_cache_create("nfs_page",
|
nfs_page_cachep = kmem_cache_create("nfs_page",
|
||||||
sizeof(struct nfs_page),
|
sizeof(struct nfs_page),
|
||||||
0, SLAB_HWCACHE_ALIGN,
|
0, SLAB_HWCACHE_ALIGN,
|
||||||
NULL, NULL);
|
NULL);
|
||||||
if (nfs_page_cachep == NULL)
|
if (nfs_page_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
|
@ -598,7 +598,7 @@ int __init nfs_init_readpagecache(void)
|
||||||
nfs_rdata_cachep = kmem_cache_create("nfs_read_data",
|
nfs_rdata_cachep = kmem_cache_create("nfs_read_data",
|
||||||
sizeof(struct nfs_read_data),
|
sizeof(struct nfs_read_data),
|
||||||
0, SLAB_HWCACHE_ALIGN,
|
0, SLAB_HWCACHE_ALIGN,
|
||||||
NULL, NULL);
|
NULL);
|
||||||
if (nfs_rdata_cachep == NULL)
|
if (nfs_rdata_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
|
@ -1467,7 +1467,7 @@ int __init nfs_init_writepagecache(void)
|
||||||
nfs_wdata_cachep = kmem_cache_create("nfs_write_data",
|
nfs_wdata_cachep = kmem_cache_create("nfs_write_data",
|
||||||
sizeof(struct nfs_write_data),
|
sizeof(struct nfs_write_data),
|
||||||
0, SLAB_HWCACHE_ALIGN,
|
0, SLAB_HWCACHE_ALIGN,
|
||||||
NULL, NULL);
|
NULL);
|
||||||
if (nfs_wdata_cachep == NULL)
|
if (nfs_wdata_cachep == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
|
@ -1032,19 +1032,19 @@ static int
|
||||||
nfsd4_init_slabs(void)
|
nfsd4_init_slabs(void)
|
||||||
{
|
{
|
||||||
stateowner_slab = kmem_cache_create("nfsd4_stateowners",
|
stateowner_slab = kmem_cache_create("nfsd4_stateowners",
|
||||||
sizeof(struct nfs4_stateowner), 0, 0, NULL, NULL);
|
sizeof(struct nfs4_stateowner), 0, 0, NULL);
|
||||||
if (stateowner_slab == NULL)
|
if (stateowner_slab == NULL)
|
||||||
goto out_nomem;
|
goto out_nomem;
|
||||||
file_slab = kmem_cache_create("nfsd4_files",
|
file_slab = kmem_cache_create("nfsd4_files",
|
||||||
sizeof(struct nfs4_file), 0, 0, NULL, NULL);
|
sizeof(struct nfs4_file), 0, 0, NULL);
|
||||||
if (file_slab == NULL)
|
if (file_slab == NULL)
|
||||||
goto out_nomem;
|
goto out_nomem;
|
||||||
stateid_slab = kmem_cache_create("nfsd4_stateids",
|
stateid_slab = kmem_cache_create("nfsd4_stateids",
|
||||||
sizeof(struct nfs4_stateid), 0, 0, NULL, NULL);
|
sizeof(struct nfs4_stateid), 0, 0, NULL);
|
||||||
if (stateid_slab == NULL)
|
if (stateid_slab == NULL)
|
||||||
goto out_nomem;
|
goto out_nomem;
|
||||||
deleg_slab = kmem_cache_create("nfsd4_delegations",
|
deleg_slab = kmem_cache_create("nfsd4_delegations",
|
||||||
sizeof(struct nfs4_delegation), 0, 0, NULL, NULL);
|
sizeof(struct nfs4_delegation), 0, 0, NULL);
|
||||||
if (deleg_slab == NULL)
|
if (deleg_slab == NULL)
|
||||||
goto out_nomem;
|
goto out_nomem;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -3143,7 +3143,7 @@ static int __init init_ntfs_fs(void)
|
||||||
|
|
||||||
ntfs_index_ctx_cache = kmem_cache_create(ntfs_index_ctx_cache_name,
|
ntfs_index_ctx_cache = kmem_cache_create(ntfs_index_ctx_cache_name,
|
||||||
sizeof(ntfs_index_context), 0 /* offset */,
|
sizeof(ntfs_index_context), 0 /* offset */,
|
||||||
SLAB_HWCACHE_ALIGN, NULL /* ctor */, NULL /* dtor */);
|
SLAB_HWCACHE_ALIGN, NULL /* ctor */);
|
||||||
if (!ntfs_index_ctx_cache) {
|
if (!ntfs_index_ctx_cache) {
|
||||||
printk(KERN_CRIT "NTFS: Failed to create %s!\n",
|
printk(KERN_CRIT "NTFS: Failed to create %s!\n",
|
||||||
ntfs_index_ctx_cache_name);
|
ntfs_index_ctx_cache_name);
|
||||||
|
@ -3151,7 +3151,7 @@ static int __init init_ntfs_fs(void)
|
||||||
}
|
}
|
||||||
ntfs_attr_ctx_cache = kmem_cache_create(ntfs_attr_ctx_cache_name,
|
ntfs_attr_ctx_cache = kmem_cache_create(ntfs_attr_ctx_cache_name,
|
||||||
sizeof(ntfs_attr_search_ctx), 0 /* offset */,
|
sizeof(ntfs_attr_search_ctx), 0 /* offset */,
|
||||||
SLAB_HWCACHE_ALIGN, NULL /* ctor */, NULL /* dtor */);
|
SLAB_HWCACHE_ALIGN, NULL /* ctor */);
|
||||||
if (!ntfs_attr_ctx_cache) {
|
if (!ntfs_attr_ctx_cache) {
|
||||||
printk(KERN_CRIT "NTFS: Failed to create %s!\n",
|
printk(KERN_CRIT "NTFS: Failed to create %s!\n",
|
||||||
ntfs_attr_ctx_cache_name);
|
ntfs_attr_ctx_cache_name);
|
||||||
|
@ -3160,7 +3160,7 @@ static int __init init_ntfs_fs(void)
|
||||||
|
|
||||||
ntfs_name_cache = kmem_cache_create(ntfs_name_cache_name,
|
ntfs_name_cache = kmem_cache_create(ntfs_name_cache_name,
|
||||||
(NTFS_MAX_NAME_LEN+1) * sizeof(ntfschar), 0,
|
(NTFS_MAX_NAME_LEN+1) * sizeof(ntfschar), 0,
|
||||||
SLAB_HWCACHE_ALIGN, NULL, NULL);
|
SLAB_HWCACHE_ALIGN, NULL);
|
||||||
if (!ntfs_name_cache) {
|
if (!ntfs_name_cache) {
|
||||||
printk(KERN_CRIT "NTFS: Failed to create %s!\n",
|
printk(KERN_CRIT "NTFS: Failed to create %s!\n",
|
||||||
ntfs_name_cache_name);
|
ntfs_name_cache_name);
|
||||||
|
@ -3169,7 +3169,7 @@ static int __init init_ntfs_fs(void)
|
||||||
|
|
||||||
ntfs_inode_cache = kmem_cache_create(ntfs_inode_cache_name,
|
ntfs_inode_cache = kmem_cache_create(ntfs_inode_cache_name,
|
||||||
sizeof(ntfs_inode), 0,
|
sizeof(ntfs_inode), 0,
|
||||||
SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, NULL, NULL);
|
SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD, NULL);
|
||||||
if (!ntfs_inode_cache) {
|
if (!ntfs_inode_cache) {
|
||||||
printk(KERN_CRIT "NTFS: Failed to create %s!\n",
|
printk(KERN_CRIT "NTFS: Failed to create %s!\n",
|
||||||
ntfs_inode_cache_name);
|
ntfs_inode_cache_name);
|
||||||
|
@ -3179,7 +3179,7 @@ static int __init init_ntfs_fs(void)
|
||||||
ntfs_big_inode_cache = kmem_cache_create(ntfs_big_inode_cache_name,
|
ntfs_big_inode_cache = kmem_cache_create(ntfs_big_inode_cache_name,
|
||||||
sizeof(big_ntfs_inode), 0,
|
sizeof(big_ntfs_inode), 0,
|
||||||
SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD,
|
SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD,
|
||||||
ntfs_big_inode_init_once, NULL);
|
ntfs_big_inode_init_once);
|
||||||
if (!ntfs_big_inode_cache) {
|
if (!ntfs_big_inode_cache) {
|
||||||
printk(KERN_CRIT "NTFS: Failed to create %s!\n",
|
printk(KERN_CRIT "NTFS: Failed to create %s!\n",
|
||||||
ntfs_big_inode_cache_name);
|
ntfs_big_inode_cache_name);
|
||||||
|
|
|
@ -592,7 +592,7 @@ static int __init init_dlmfs_fs(void)
|
||||||
sizeof(struct dlmfs_inode_private),
|
sizeof(struct dlmfs_inode_private),
|
||||||
0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
|
0, (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
|
||||||
SLAB_MEM_SPREAD),
|
SLAB_MEM_SPREAD),
|
||||||
dlmfs_init_once, NULL);
|
dlmfs_init_once);
|
||||||
if (!dlmfs_inode_cache)
|
if (!dlmfs_inode_cache)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
cleanup_inode = 1;
|
cleanup_inode = 1;
|
||||||
|
|
|
@ -510,7 +510,7 @@ int dlm_init_mle_cache(void)
|
||||||
dlm_mle_cache = kmem_cache_create("dlm_mle_cache",
|
dlm_mle_cache = kmem_cache_create("dlm_mle_cache",
|
||||||
sizeof(struct dlm_master_list_entry),
|
sizeof(struct dlm_master_list_entry),
|
||||||
0, SLAB_HWCACHE_ALIGN,
|
0, SLAB_HWCACHE_ALIGN,
|
||||||
NULL, NULL);
|
NULL);
|
||||||
if (dlm_mle_cache == NULL)
|
if (dlm_mle_cache == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -984,7 +984,7 @@ static int ocfs2_initialize_mem_caches(void)
|
||||||
0,
|
0,
|
||||||
(SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
|
(SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT|
|
||||||
SLAB_MEM_SPREAD),
|
SLAB_MEM_SPREAD),
|
||||||
ocfs2_inode_init_once, NULL);
|
ocfs2_inode_init_once);
|
||||||
if (!ocfs2_inode_cachep)
|
if (!ocfs2_inode_cachep)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче