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

Function journal_alloc_journal_head

Ext4Fsd/jbd2/journal.c:2435–2450  ·  view source on GitHub ↗

* journal_head splicing and dicing */

Source from the content-addressed store, hash-verified

2433 * journal_head splicing and dicing
2434 */
2435static 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
2452static void journal_free_journal_head(struct journal_head *jh)
2453{

Callers 1

Calls 1

atomic_incFunction · 0.85

Tested by

no test coverage detected