Commit ea0abbb6 authored by Vasily Averin's avatar Vasily Averin Committed by Theodore Ts'o
Browse files

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



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
parent 61a9c11e
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -1121,8 +1121,10 @@ static void update_backups(struct super_block *sb, sector_t blk_off, char *data,
			   backup_block, backup_block -
			   backup_block, backup_block -
			   ext4_group_first_block_no(sb, group));
			   ext4_group_first_block_no(sb, group));
		BUFFER_TRACE(bh, "get_write_access");
		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;
			break;
		}
		lock_buffer(bh);
		lock_buffer(bh);
		memcpy(bh->b_data, data, size);
		memcpy(bh->b_data, data, size);
		if (rest)
		if (rest)