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

ext4: add missing brelse() update_backups()'s error path

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

commit ea0abbb6 upstream.

Fixes: ac27a0ec ("ext4: initial copy of files from ext3")
Signed-off-by: default avatarVasily Averin <vvs@virtuozzo.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org # 2.6.19
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 20c85bb0
......@@ -1095,8 +1095,10 @@ static void update_backups(struct super_block *sb, sector_t blk_off, char *data,
backup_block, backup_block -
ext4_group_first_block_no(sb, group));
BUFFER_TRACE(bh, "get_write_access");
if ((err = ext4_journal_get_write_access(handle, bh)))
if ((err = ext4_journal_get_write_access(handle, bh))) {
brelse(bh);
break;
}
lock_buffer(bh);
memcpy(bh->b_data, data, size);
if (rest)
......
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