summaryrefslogtreecommitdiff
path: root/fs/ext4
diff options
context:
space:
mode:
authorVasily Averin <vvs@virtuozzo.com>2018-11-04 00:11:19 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-22 09:32:47 +0300
commit2b23c27fb1b995358821989bbcf9710ea2904fb8 (patch)
tree1e1814e4bcf4cffefa2dc169a367b98deff3162c /fs/ext4
parentf50147c4f73ede4e959c059410a084e9251a6fb9 (diff)
downloadlinux-2b23c27fb1b995358821989bbcf9710ea2904fb8.tar.xz
ext4: add missing brelse() update_backups()'s error path
commit ea0abbb648452cdb6e1734b702b6330a7448fcf8 upstream. Fixes: ac27a0ec112a ("ext4: initial copy of files from ext3") Signed-off-by: Vasily Averin <vvs@virtuozzo.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@kernel.org # 2.6.19 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/resize.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 1a46ed4b6653..f0588933a085 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -1095,8 +1095,10 @@ static void update_backups(struct super_block *sb, int 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)