[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230826173735.4023594-3-shikemeng@huaweicloud.com>
Date: Sun, 27 Aug 2023 01:37:24 +0800
From: Kemeng Shi <shikemeng@...weicloud.com>
To: tytso@....edu, adilger.kernel@...ger.ca,
linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v2 02/13] ext4: add missed brelse in update_backups
add missed brelse in update_backups
Signed-off-by: Kemeng Shi <shikemeng@...weicloud.com>
Reviewed-by: Theodore Ts'o <tytso@....edu>
---
fs/ext4/resize.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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)
--
2.30.0
Powered by blists - more mailing lists