mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-21 20:36:50 +00:00
btrfs-progs: free-space-cache: Don't panic when free space cache is corrupted
In btrfs_add_free_space(), if the free space to be added is already here, we trigger ASSERT() which is just another BUG_ON(). Let's remove such BUG_ON() at all. Reported-by: Lewis Diamond <me@lewisdiamond.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
d4f19ad084
commit
581e2c16a3
@ -838,10 +838,8 @@ int btrfs_add_free_space(struct btrfs_free_space_ctl *ctl, u64 offset,
|
||||
try_merge_free_space(ctl, info);
|
||||
|
||||
ret = link_free_space(ctl, info);
|
||||
if (ret) {
|
||||
if (ret)
|
||||
printk(KERN_CRIT "btrfs: unable to add free space :%d\n", ret);
|
||||
BUG_ON(ret == -EEXIST);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user