From 8533b2249e1550b233a4836d039d64e3bb2fed7a Mon Sep 17 00:00:00 2001 From: Tao Huang Date: Thu, 5 Dec 2024 16:17:44 +0800 Subject: [PATCH] Revert "exfat: fix memory leak in exfat_load_bitmap()" This reverts commit 6732e1af29e7a264656289f514616454d18c2a19. Replaced by commit 4e1813e52f86 ("exfat: fix memory leak in exfat_load_bitmap()"). Signed-off-by: Tao Huang Change-Id: I323d80bccfc1c1fa021d9b86433a766f7bbebe5b --- fs/exfat/balloc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fs/exfat/balloc.c b/fs/exfat/balloc.c index 54e93db1621a..e918decb3735 100644 --- a/fs/exfat/balloc.c +++ b/fs/exfat/balloc.c @@ -110,14 +110,10 @@ int exfat_load_bitmap(struct super_block *sb) return -EIO; type = exfat_get_entry_type(ep); - if (type == TYPE_UNUSED) { - brelse(bh); + if (type == TYPE_UNUSED) break; - } - if (type != TYPE_BITMAP) { - brelse(bh); + if (type != TYPE_BITMAP) continue; - } if (ep->dentry.bitmap.flags == 0x0) { int err;