aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKemeng Shi2023-08-27 01:47:01 +0800
committerGreg Kroah-Hartman2023-11-28 17:07:21 +0000
commite1d0f68bc07fee57d1855355dbb94092b895a9f4 (patch)
treefc85a3f5a2796374d64d9780fbe7414e4d2345d0
parent1793dc461e5a081087ab4d34b39b838bdce3f7e9 (diff)
ext4: add missed brelse in update_backups
commit 9adac8b01f4be28acd5838aade42b8daa4f0b642 upstream. add missed brelse in update_backups Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com> Reviewed-by: Theodore Ts'o <tytso@mit.edu> Link: https://lore.kernel.org/r/20230826174712.4059355-3-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 d14e8cec06ee..9833ab6db117 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -1186,8 +1186,10 @@ static void update_backups(struct super_block *sb, sector_t blk_off, char *data,
ext4_group_first_block_no(sb, group));
BUFFER_TRACE(bh, "get_write_access");
if ((err = ext4_journal_get_write_access(handle, sb, bh,
- EXT4_JTR_NONE)))
+ EXT4_JTR_NONE))) {
+ brelse(bh);
break;
+ }
lock_buffer(bh);
memcpy(bh->b_data, data, size);
if (rest)