Showing error 204

User: Jiri Slaby
Error type: BUG/WARNING
Error type description: An unsatisfied assertion in the code
File location: fs/jbd2/journal.c
Line in file: 1108
Project: Linux Kernel
Project version: 2.6.28
Tools: Web Crawler (0.1)
URL: https://bugzilla.kernel.org/show_bug.cgi?id=12370
Entered: 2011-09-08 08:32:47 UTC


Source:

1078                  (long long) inode->i_size,
1079                  inode->i_sb->s_blocksize_bits, inode->i_sb->s_blocksize);
1080
1081        journal->j_maxlen = inode->i_size >> inode->i_sb->s_blocksize_bits;
1082        journal->j_blocksize = inode->i_sb->s_blocksize;
1083        jbd2_stats_proc_init(journal);
1084
1085        /* journal descriptor can store up to n blocks -bzzz */
1086        n = journal->j_blocksize / sizeof(journal_block_tag_t);
1087        journal->j_wbufsize = n;
1088        journal->j_wbuf = kmalloc(n * sizeof(struct buffer_head*), GFP_KERNEL);
1089        if (!journal->j_wbuf) {
1090                printk(KERN_ERR "%s: Cant allocate bhs for commit thread\n",
1091                        __func__);
1092                jbd2_stats_proc_exit(journal);
1093                kfree(journal);
1094                return NULL;
1095        }
1096
1097        err = jbd2_journal_bmap(journal, 0, &blocknr);
1098        /* If that failed, give up */
1099        if (err) {
1100                printk(KERN_ERR "%s: Cannnot locate journal superblock\n",
1101                       __func__);
1102                jbd2_stats_proc_exit(journal);
1103                kfree(journal);
1104                return NULL;
1105        }
1106
1107        bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize);
1108        J_ASSERT(bh != NULL);
1109        journal->j_sb_buffer = bh;
1110        journal->j_superblock = (journal_superblock_t *)bh->b_data;
1111
1112        return journal;
1113}
1114
1115/*
1116 * If the journal init or create aborts, we need to mark the journal
1117 * superblock as being NULL to prevent the journal destroy from writing
1118 * back a bogus superblock.
Show full sources