ext4: fix oops when loading block bitmap failed
authorJan Kara <jack@suse.cz>
Thu, 30 Oct 2014 14:53:16 +0000 (10:53 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Nov 2014 16:59:59 +0000 (08:59 -0800)
commit321c3786930647114536bbba7020575f5662d1e4
treec7e25729ddc282eb8e639a92f579908b3abee2ee
parente2e5d26de93166a8fde80c7e3691571ce0796e0b
ext4: fix oops when loading block bitmap failed

commit 599a9b77ab289d85c2d5c8607624efbe1f552b0f upstream.

When we fail to load block bitmap in __ext4_new_inode() we will
dereference NULL pointer in ext4_journal_get_write_access(). So check
for error from ext4_read_block_bitmap().

Coverity-id: 989065
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/ialloc.c