mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-22 17:01:14 +00:00
ext4: add missing brelse() in set_flexbg_block_bitmap()'s error path
Fixes: 33afdcc540
("ext4: add a function which sets up group blocks ...")
Cc: stable@kernel.org # 3.3
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
9e4028935c
commit
cea5794122
1 changed files with 4 additions and 2 deletions
|
@ -459,16 +459,18 @@ static int set_flexbg_block_bitmap(struct super_block *sb, handle_t *handle,
|
||||||
|
|
||||||
BUFFER_TRACE(bh, "get_write_access");
|
BUFFER_TRACE(bh, "get_write_access");
|
||||||
err = ext4_journal_get_write_access(handle, bh);
|
err = ext4_journal_get_write_access(handle, bh);
|
||||||
if (err)
|
if (err) {
|
||||||
|
brelse(bh);
|
||||||
return err;
|
return err;
|
||||||
|
}
|
||||||
ext4_debug("mark block bitmap %#04llx (+%llu/%u)\n",
|
ext4_debug("mark block bitmap %#04llx (+%llu/%u)\n",
|
||||||
first_cluster, first_cluster - start, count2);
|
first_cluster, first_cluster - start, count2);
|
||||||
ext4_set_bits(bh->b_data, first_cluster - start, count2);
|
ext4_set_bits(bh->b_data, first_cluster - start, count2);
|
||||||
|
|
||||||
err = ext4_handle_dirty_metadata(handle, NULL, bh);
|
err = ext4_handle_dirty_metadata(handle, NULL, bh);
|
||||||
|
brelse(bh);
|
||||||
if (unlikely(err))
|
if (unlikely(err))
|
||||||
return err;
|
return err;
|
||||||
brelse(bh);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue