* journal_head splicing and dicing */
| 2433 | * journal_head splicing and dicing |
| 2434 | */ |
| 2435 | static struct journal_head *journal_alloc_journal_head(void) |
| 2436 | { |
| 2437 | struct journal_head *ret; |
| 2438 | |
| 2439 | #ifdef CONFIG_JBD2_DEBUG |
| 2440 | atomic_inc(&nr_journal_heads); |
| 2441 | #endif |
| 2442 | ret = kmem_cache_zalloc(jbd2_journal_head_cache, GFP_NOFS); |
| 2443 | if (!ret) { |
| 2444 | jbd_debug(1, "out of memory for journal_head\n"); |
| 2445 | pr_notice_ratelimited("ENOMEM in %s, retrying.\n", __func__); |
| 2446 | ret = kmem_cache_zalloc(jbd2_journal_head_cache, |
| 2447 | GFP_NOFS | __GFP_NOFAIL); |
| 2448 | } |
| 2449 | return ret; |
| 2450 | } |
| 2451 | |
| 2452 | static void journal_free_journal_head(struct journal_head *jh) |
| 2453 | { |
no test coverage detected