MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / jbd2_journal_init_handle_cache

Function jbd2_journal_init_handle_cache

Ext4Fsd/jbd2/journal.c:2669–2683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2667struct kmem_cache *jbd2_handle_cache, *jbd2_inode_cache;
2668
2669static int __init jbd2_journal_init_handle_cache(void)
2670{
2671 jbd2_handle_cache = KMEM_CACHE(jbd2_journal_handle, SLAB_TEMPORARY);
2672 if (jbd2_handle_cache == NULL) {
2673 printk(KERN_EMERG "JBD2: failed to create handle cache\n");
2674 return -ENOMEM;
2675 }
2676 jbd2_inode_cache = KMEM_CACHE(jbd2_inode, 0);
2677 if (jbd2_inode_cache == NULL) {
2678 printk(KERN_EMERG "JBD2: failed to create inode cache\n");
2679 kmem_cache_destroy(jbd2_handle_cache);
2680 return -ENOMEM;
2681 }
2682 return 0;
2683}
2684
2685static void jbd2_journal_destroy_handle_cache(void)
2686{

Callers 1

journal_init_cachesFunction · 0.85

Calls 1

kmem_cache_destroyFunction · 0.85

Tested by

no test coverage detected