Commit b44a5834 authored by Vasily Averin's avatar Vasily Averin Committed by Kleber Sacilotto de Souza

ext4: add missing brelse() in set_flexbg_block_bitmap()'s error path

BugLink: https://bugs.launchpad.net/bugs/1810947

commit cea57941 upstream.

Fixes: 33afdcc5 ("ext4: add a function which sets up group blocks ...")
Cc: stable@kernel.org # 3.3
Signed-off-by: default avatarVasily Averin <vvs@virtuozzo.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent af74a41a
...@@ -442,16 +442,18 @@ static int set_flexbg_block_bitmap(struct super_block *sb, handle_t *handle, ...@@ -442,16 +442,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", block, ext4_debug("mark block bitmap %#04llx (+%llu/%u)\n", block,
block - start, count2); block - start, count2);
ext4_set_bits(bh->b_data, block - start, count2); ext4_set_bits(bh->b_data, block - 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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment