aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd/journal.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jbd/journal.c')
-rw-r--r--fs/jbd/journal.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c
index 3943a8905eb2..0e081d5f32e8 100644
--- a/fs/jbd/journal.c
+++ b/fs/jbd/journal.c
@@ -697,13 +697,14 @@ fail:
697 */ 697 */
698 698
699/** 699/**
700 * journal_t * journal_init_dev() - creates an initialises a journal structure 700 * journal_t * journal_init_dev() - creates and initialises a journal structure
701 * @bdev: Block device on which to create the journal 701 * @bdev: Block device on which to create the journal
702 * @fs_dev: Device which hold journalled filesystem for this journal. 702 * @fs_dev: Device which hold journalled filesystem for this journal.
703 * @start: Block nr Start of journal. 703 * @start: Block nr Start of journal.
704 * @len: Length of the journal in blocks. 704 * @len: Length of the journal in blocks.
705 * @blocksize: blocksize of journalling device 705 * @blocksize: blocksize of journalling device
706 * @returns: a newly created journal_t * 706 *
707 * Returns: a newly created journal_t *
707 * 708 *
708 * journal_init_dev creates a journal which maps a fixed contiguous 709 * journal_init_dev creates a journal which maps a fixed contiguous
709 * range of blocks on an arbitrary block device. 710 * range of blocks on an arbitrary block device.
@@ -1619,14 +1620,14 @@ static int journal_init_journal_head_cache(void)
1619{ 1620{
1620 int retval; 1621 int retval;
1621 1622
1622 J_ASSERT(journal_head_cache == 0); 1623 J_ASSERT(journal_head_cache == NULL);
1623 journal_head_cache = kmem_cache_create("journal_head", 1624 journal_head_cache = kmem_cache_create("journal_head",
1624 sizeof(struct journal_head), 1625 sizeof(struct journal_head),
1625 0, /* offset */ 1626 0, /* offset */
1626 SLAB_TEMPORARY, /* flags */ 1627 SLAB_TEMPORARY, /* flags */
1627 NULL); /* ctor */ 1628 NULL); /* ctor */
1628 retval = 0; 1629 retval = 0;
1629 if (journal_head_cache == 0) { 1630 if (!journal_head_cache) {
1630 retval = -ENOMEM; 1631 retval = -ENOMEM;
1631 printk(KERN_EMERG "JBD: no memory for journal_head cache\n"); 1632 printk(KERN_EMERG "JBD: no memory for journal_head cache\n");
1632 } 1633 }