提交 f7b6459e 编写于 作者: V Vasily Averin 提交者: Greg Kroah-Hartman

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

commit ea0abbb6 upstream.

Fixes: ac27a0ec ("ext4: initial copy of files from ext3")
Signed-off-by: NVasily Averin <vvs@virtuozzo.com>
Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org # 2.6.19
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 ebbc6fce
......@@ -1124,8 +1124,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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册