diff options
author | Vasily Averin <vvs@virtuozzo.com> | 2018-11-03 17:11:19 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2018-11-03 17:11:19 -0400 |
commit | ea0abbb648452cdb6e1734b702b6330a7448fcf8 (patch) | |
tree | 365b3f1ad3d6c576649cfafdfbdb384d8ab1e9cf | |
parent | 61a9c11e5e7a0dab5381afa5d9d4dd5ebf18f7a0 (diff) |
ext4: add missing brelse() update_backups()'s error path
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
-rw-r--r-- | fs/ext4/resize.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 7131f35b62d9..3df326ee6d50 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c | |||
@@ -1121,8 +1121,10 @@ static void update_backups(struct super_block *sb, sector_t blk_off, char *data, | |||
1121 | backup_block, backup_block - | 1121 | backup_block, backup_block - |
1122 | ext4_group_first_block_no(sb, group)); | 1122 | ext4_group_first_block_no(sb, group)); |
1123 | BUFFER_TRACE(bh, "get_write_access"); | 1123 | BUFFER_TRACE(bh, "get_write_access"); |
1124 | if ((err = ext4_journal_get_write_access(handle, bh))) | 1124 | if ((err = ext4_journal_get_write_access(handle, bh))) { |
1125 | brelse(bh); | ||
1125 | break; | 1126 | break; |
1127 | } | ||
1126 | lock_buffer(bh); | 1128 | lock_buffer(bh); |
1127 | memcpy(bh->b_data, data, size); | 1129 | memcpy(bh->b_data, data, size); |
1128 | if (rest) | 1130 | if (rest) |