From patchwork Fri Nov 7 02:07:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gui Hecheng X-Patchwork-Id: 5249251 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4B8029F2F1 for ; Fri, 7 Nov 2014 02:09:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 76DEF20145 for ; Fri, 7 Nov 2014 02:09:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B049E2012E for ; Fri, 7 Nov 2014 02:09:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751270AbaKGCJS (ORCPT ); Thu, 6 Nov 2014 21:09:18 -0500 Received: from cn.fujitsu.com ([59.151.112.132]:54000 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751160AbaKGCJQ (ORCPT ); Thu, 6 Nov 2014 21:09:16 -0500 X-IronPort-AV: E=Sophos;i="5.04,848,1406563200"; d="scan'208";a="42997200" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 07 Nov 2014 10:06:04 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id sA7294Tm011250 for ; Fri, 7 Nov 2014 10:09:04 +0800 Received: from localhost.localdomain (10.167.226.111) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Fri, 7 Nov 2014 10:09:14 +0800 From: Gui Hecheng To: CC: Gui Hecheng Subject: [PATCH 1/2] btrfs-progs: remove BUG_ON on num of devices for btrfs fi show Date: Fri, 7 Nov 2014 10:07:42 +0800 Message-ID: <1415326063-8838-2-git-send-email-guihc.fnst@cn.fujitsu.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1415326063-8838-1-git-send-email-guihc.fnst@cn.fujitsu.com> References: <1415326063-8838-1-git-send-email-guihc.fnst@cn.fujitsu.com> MIME-Version: 1.0 X-Originating-IP: [10.167.226.111] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The following BUG_ON: BUG_ON(ndevs >= fi_args->num_devices) is not needed, because it always fails with seed devices present. Signed-off-by: Gui Hecheng --- utils.c | 1 - 1 file changed, 1 deletion(-) diff --git a/utils.c b/utils.c index f10c178..9bcc1a0 100644 --- a/utils.c +++ b/utils.c @@ -1889,7 +1889,6 @@ int get_fs_info(char *path, struct btrfs_ioctl_fs_info_args *fi_args, i++; for (; i <= fi_args->max_id; ++i) { - BUG_ON(ndevs >= fi_args->num_devices); ret = get_device_info(fd, i, &di_args[ndevs]); if (ret == -ENODEV) continue;