From patchwork Wed Jul 29 02:28:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 6888981 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DC661C05AC for ; Wed, 29 Jul 2015 02:30:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F0BEB207A2 for ; Wed, 29 Jul 2015 02:30:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 24688207A1 for ; Wed, 29 Jul 2015 02:30:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752352AbbG2CaX (ORCPT ); Tue, 28 Jul 2015 22:30:23 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:5460 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751520AbbG2CaX (ORCPT ); Tue, 28 Jul 2015 22:30:23 -0400 X-IronPort-AV: E=Sophos;i="5.15,520,1432569600"; d="scan'208";a="99009261" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 29 Jul 2015 10:33:55 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id t6T2ST3n019900; Wed, 29 Jul 2015 10:28:29 +0800 Received: from localhost.localdomain (10.167.226.33) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Wed, 29 Jul 2015 10:30:19 +0800 From: Qu Wenruo To: CC: Subject: [PATCH] btrfs-progs: Add missing exit for parse_profile function Date: Wed, 29 Jul 2015 10:28:17 +0800 Message-ID: <1438136897-11590-1-git-send-email-quwenruo@cn.fujitsu.com> X-Mailer: git-send-email 2.4.6 MIME-Version: 1.0 X-Originating-IP: [10.167.226.33] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-8.3 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 In parse_profile() function, in error handling route, it output error message but forgot to exit(1), causing even profile is not valid, it will just fallback to single. Reported-by: James Harvey Signed-off-by: Qu Wenruo --- mkfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mkfs.c b/mkfs.c index 9073f87..7d635dc 100644 --- a/mkfs.c +++ b/mkfs.c @@ -356,6 +356,7 @@ static u64 parse_profile(char *s) return 0; } else { fprintf(stderr, "Unknown profile %s\n", s); + exit(1); } /* not reached */ return 0;