Message ID | 20200803094318.776-1-nborisov@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs: Remove spurious BUG_ON in btrfs_get_extent | expand |
On Mon, Aug 03, 2020 at 12:43:18PM +0300, Nikolay Borisov wrote: > That BUG_ON cannot ever trigger because as the comment there states - > 'err' is always set. Simply remove it as it brings no value. > > Signed-off-by: Nikolay Borisov <nborisov@suse.com> Added to misc-next, thanks.
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 14aed0d3cb51..0df881e39f57 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6740,7 +6740,6 @@ struct extent_map *btrfs_get_extent(struct btrfs_inode *inode, free_extent_map(em); return ERR_PTR(err); } - BUG_ON(!em); /* Error is always set */ return em; }
That BUG_ON cannot ever trigger because as the comment there states - 'err' is always set. Simply remove it as it brings no value. Signed-off-by: Nikolay Borisov <nborisov@suse.com> --- fs/btrfs/inode.c | 1 - 1 file changed, 1 deletion(-)