summaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorKemeng Shi <shikemeng@huaweicloud.com>2023-08-27 01:47:01 +0800
committerTheodore Ts'o <tytso@mit.edu>2023-10-05 22:32:14 -0400
commit9adac8b01f4be28acd5838aade42b8daa4f0b642 (patch)
tree0455cc6c3cb5fd0106f3271b96b8ec5bd64fd417 /fs/ext4
parent31f13421c004a420c0e9d288859c9ea9259ea0cc (diff)
downloadlinux-stable-9adac8b01f4be28acd5838aade42b8daa4f0b642.tar.gz
linux-stable-9adac8b01f4be28acd5838aade42b8daa4f0b642.tar.bz2
linux-stable-9adac8b01f4be28acd5838aade42b8daa4f0b642.zip
ext4: add missed brelse in update_backups
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
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 87cd5b07a970..7cbc695b7005 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -1191,8 +1191,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)