Skip to content

Commit

Permalink
Btrfs: convert BUG_ON to WARN_ON
Browse files Browse the repository at this point in the history
These two BUG_ON()s would never be true, ensured by callers' logic.

Reviewed-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Liu Bo authored and David Sterba committed Apr 18, 2017
1 parent 2b19a1f commit 539b50d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -5174,7 +5174,7 @@ unsigned long btrfs_full_stripe_len(struct btrfs_fs_info *fs_info,
unsigned long len = fs_info->sectorsize;

em = get_chunk_map(fs_info, logical, len);
BUG_ON(IS_ERR(em));
WARN_ON(IS_ERR(em));

map = em->map_lookup;
if (map->type & BTRFS_BLOCK_GROUP_RAID56_MASK)
Expand All @@ -5191,7 +5191,7 @@ int btrfs_is_parity_mirror(struct btrfs_fs_info *fs_info,
int ret = 0;

em = get_chunk_map(fs_info, logical, len);
BUG_ON(IS_ERR(em));
WARN_ON(IS_ERR(em));

map = em->map_lookup;
if (map->type & BTRFS_BLOCK_GROUP_RAID56_MASK)
Expand Down

0 comments on commit 539b50d

Please sign in to comment.