Whamcloud - gitweb
libext2fs: write_journal_inode should check iterate return value
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 8 Sep 2014 23:12:02 +0000 (16:12 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 11 Sep 2014 16:40:54 +0000 (12:40 -0400)
commitfc06f25a101f31a7b4729f5da9fcf78ff6b9c969
tree36c8291759c1378c374698da1354659a22dc2bbc
parent4f769f4c03e7b3a8dd5ca129bbb820f0d00f2423
libext2fs: write_journal_inode should check iterate return value

When creating a journal inode, check the return value from
block_iterate3() because otherwise we fail to capture errors such as
being unable to allocate an extent tree block, which leads to e2fsck
creating broken journals.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/mkjournal.c
tests/f_jnl_etb_alloc_fail/expect.1 [new file with mode: 0644]
tests/f_jnl_etb_alloc_fail/expect.2 [new file with mode: 0644]
tests/f_jnl_etb_alloc_fail/image.gz [new file with mode: 0644]
tests/f_jnl_etb_alloc_fail/name [new file with mode: 0644]