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;
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))