Message ID | 20180701024526.25740-1-wqu@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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 <me@lewisdiamond.com> > Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Nikolay Borisov <nborisov@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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sun, Jul 01, 2018 at 10:45:26AM +0800, 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 <me@lewisdiamond.com> > Signed-off-by: Qu Wenruo <wqu@suse.com> Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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; }
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> --- free-space-cache.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)