[PATCH] ext2 block allocator fixes
Fix a couple of problems which were introduced by a recent race fix in the ext2 block allocator: - if the allocation attempt raced, and lost the race then a new attempt is made. But the earlier reservation must be put back first. Add a call to group_release_blocks() to fix this. - if the filesystem is genuinely corrupted then the code as-is can get stuck in an infinite loop, thinking that a blockgroup has free blocks and then discovering that its bitmap is full. Fix this by baling out after having scanned all blockgroups twice. (Thanks Muli Ben-Yehuda <mulix@mulix.org> for spotting this).
Showing
Please register or sign in to comment