Revert "exfat: fix memory leak in exfat_load_bitmap()"

This reverts commit defa602d2c.
This commit is contained in:
Ksawlii 2024-11-24 00:23:02 +01:00
parent 9378ee00ac
commit 5ef504acd1

View file

@ -110,8 +110,11 @@ int exfat_load_bitmap(struct super_block *sb)
return -EIO; return -EIO;
type = exfat_get_entry_type(ep); type = exfat_get_entry_type(ep);
if (type == TYPE_BITMAP && if (type == TYPE_UNUSED)
ep->dentry.bitmap.flags == 0x0) { break;
if (type != TYPE_BITMAP)
continue;
if (ep->dentry.bitmap.flags == 0x0) {
int err; int err;
err = exfat_allocate_bitmap(sb, ep); err = exfat_allocate_bitmap(sb, ep);
@ -119,9 +122,6 @@ int exfat_load_bitmap(struct super_block *sb)
return err; return err;
} }
brelse(bh); brelse(bh);
if (type == TYPE_UNUSED)
return -EINVAL;
} }
if (exfat_get_next_cluster(sb, &clu.dir)) if (exfat_get_next_cluster(sb, &clu.dir))