From 5ef504acd1e508f59e3672d2f297e35ae61277ed Mon Sep 17 00:00:00 2001 From: Ksawlii Date: Sun, 24 Nov 2024 00:23:02 +0100 Subject: [PATCH] Revert "exfat: fix memory leak in exfat_load_bitmap()" This reverts commit defa602d2c8826b7e7d3123e335fbf5e74a799c9. --- fs/exfat/balloc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/exfat/balloc.c b/fs/exfat/balloc.c index 01afab05e..132943a86 100755 --- a/fs/exfat/balloc.c +++ b/fs/exfat/balloc.c @@ -110,8 +110,11 @@ int exfat_load_bitmap(struct super_block *sb) return -EIO; type = exfat_get_entry_type(ep); - if (type == TYPE_BITMAP && - ep->dentry.bitmap.flags == 0x0) { + if (type == TYPE_UNUSED) + break; + if (type != TYPE_BITMAP) + continue; + if (ep->dentry.bitmap.flags == 0x0) { int err; err = exfat_allocate_bitmap(sb, ep); @@ -119,9 +122,6 @@ int exfat_load_bitmap(struct super_block *sb) return err; } brelse(bh); - - if (type == TYPE_UNUSED) - return -EINVAL; } if (exfat_get_next_cluster(sb, &clu.dir))