At 02/18/2017 09:28 AM, Liu Bo wrote:
These two BUG_ON()s would never be true, ensured by callers' logic.

Never a bad idea to remove BUG_ON.

Reviewed-by: Qu Wenruo <quwen...@cn.fujits.com>

Thanks,
Qu

Signed-off-by: Liu Bo <bo.li....@oracle.com>
---
 fs/btrfs/volumes.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 4a334a9..ce74b6c 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -5170,7 +5170,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)
@@ -5187,7 +5187,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)



--
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