From patchwork Tue Mar 14 20:34:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Bo X-Patchwork-Id: 9624451 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9B565604A9 for ; Tue, 14 Mar 2017 20:35:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E489285C3 for ; Tue, 14 Mar 2017 20:35:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 835EC285C5; Tue, 14 Mar 2017 20:35:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B217285C3 for ; Tue, 14 Mar 2017 20:35:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753023AbdCNUfZ (ORCPT ); Tue, 14 Mar 2017 16:35:25 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:35562 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752851AbdCNUfO (ORCPT ); Tue, 14 Mar 2017 16:35:14 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v2EKZ62k019697 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Mar 2017 20:35:07 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v2EKZ6WN014766 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Mar 2017 20:35:06 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v2EKZ6rw019701; Tue, 14 Mar 2017 20:35:06 GMT Received: from localhost.us.oracle.com (/10.211.47.181) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 14 Mar 2017 13:35:06 -0700 From: Liu Bo To: linux-btrfs@vger.kernel.org Cc: David Sterba , Qu Wenruo Subject: [PATCH v2 7/7] Btrfs: convert BUG_ON to WARN_ON Date: Tue, 14 Mar 2017 13:34:01 -0700 Message-Id: <1489523641-10345-8-git-send-email-bo.li.liu@oracle.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1489523641-10345-1-git-send-email-bo.li.liu@oracle.com> References: <1489523641-10345-1-git-send-email-bo.li.liu@oracle.com> X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP These two BUG_ON()s would never be true, ensured by callers' logic. Reviewed-by: Qu Wenruo Signed-off-by: Liu Bo --- 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 10f69d1..61b96ec 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -5168,7 +5168,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) @@ -5185,7 +5185,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)