diff options
Diffstat (limited to 'fs/ext4/balloc.c')
-rw-r--r-- | fs/ext4/balloc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 386cb79ac4b6..1ae5004e93fc 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c | |||
@@ -321,12 +321,15 @@ ext4_read_block_bitmap(struct super_block *sb, ext4_group_t block_group) | |||
321 | if (bh_uptodate_or_lock(bh)) | 321 | if (bh_uptodate_or_lock(bh)) |
322 | return bh; | 322 | return bh; |
323 | 323 | ||
324 | spin_lock(sb_bgl_lock(EXT4_SB(sb), block_group)); | ||
324 | if (desc->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) { | 325 | if (desc->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) { |
325 | ext4_init_block_bitmap(sb, bh, block_group, desc); | 326 | ext4_init_block_bitmap(sb, bh, block_group, desc); |
326 | set_buffer_uptodate(bh); | 327 | set_buffer_uptodate(bh); |
327 | unlock_buffer(bh); | 328 | unlock_buffer(bh); |
329 | spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group)); | ||
328 | return bh; | 330 | return bh; |
329 | } | 331 | } |
332 | spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group)); | ||
330 | if (bh_submit_read(bh) < 0) { | 333 | if (bh_submit_read(bh) < 0) { |
331 | put_bh(bh); | 334 | put_bh(bh); |
332 | ext4_error(sb, __func__, | 335 | ext4_error(sb, __func__, |