| 2667 | struct kmem_cache *jbd2_handle_cache, *jbd2_inode_cache; |
| 2668 | |
| 2669 | static 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 | |
| 2685 | static void jbd2_journal_destroy_handle_cache(void) |
| 2686 | { |
no test coverage detected