diff options
Diffstat (limited to 'fs/ext4/ialloc.c')
-rw-r--r-- | fs/ext4/ialloc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c index 5b87fc36aab8..ac644c31ca67 100644 --- a/fs/ext4/ialloc.c +++ b/fs/ext4/ialloc.c | |||
@@ -887,6 +887,10 @@ got: | |||
887 | struct buffer_head *block_bitmap_bh; | 887 | struct buffer_head *block_bitmap_bh; |
888 | 888 | ||
889 | block_bitmap_bh = ext4_read_block_bitmap(sb, group); | 889 | block_bitmap_bh = ext4_read_block_bitmap(sb, group); |
890 | if (!block_bitmap_bh) { | ||
891 | err = -EIO; | ||
892 | goto out; | ||
893 | } | ||
890 | BUFFER_TRACE(block_bitmap_bh, "get block bitmap access"); | 894 | BUFFER_TRACE(block_bitmap_bh, "get block bitmap access"); |
891 | err = ext4_journal_get_write_access(handle, block_bitmap_bh); | 895 | err = ext4_journal_get_write_access(handle, block_bitmap_bh); |
892 | if (err) { | 896 | if (err) { |
@@ -1011,8 +1015,7 @@ got: | |||
1011 | spin_unlock(&sbi->s_next_gen_lock); | 1015 | spin_unlock(&sbi->s_next_gen_lock); |
1012 | 1016 | ||
1013 | /* Precompute checksum seed for inode metadata */ | 1017 | /* Precompute checksum seed for inode metadata */ |
1014 | if (EXT4_HAS_RO_COMPAT_FEATURE(sb, | 1018 | if (ext4_has_metadata_csum(sb)) { |
1015 | EXT4_FEATURE_RO_COMPAT_METADATA_CSUM)) { | ||
1016 | __u32 csum; | 1019 | __u32 csum; |
1017 | __le32 inum = cpu_to_le32(inode->i_ino); | 1020 | __le32 inum = cpu_to_le32(inode->i_ino); |
1018 | __le32 gen = cpu_to_le32(inode->i_generation); | 1021 | __le32 gen = cpu_to_le32(inode->i_generation); |