On  1.07.2018 05:45, Qu Wenruo wrote:
> 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 <m...@lewisdiamond.com>
> Signed-off-by: Qu Wenruo <w...@suse.com>

Reviewed-by: Nikolay Borisov <nbori...@suse.com>

> ---
>  free-space-cache.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/free-space-cache.c b/free-space-cache.c
> index 9b83a71ca59a..2ef2d307cc5d 100644
> --- a/free-space-cache.c
> +++ b/free-space-cache.c
> @@ -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;
>  }
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to