From patchwork Wed Apr 26 18:05:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Zwisler X-Patchwork-Id: 9701777 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 EDEA0603F8 for ; Wed, 26 Apr 2017 18:05:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E14451FFD6 for ; Wed, 26 Apr 2017 18:05:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D5DFE28646; Wed, 26 Apr 2017 18:05:42 +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=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8FA8A28639 for ; Wed, 26 Apr 2017 18:05:42 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 2A7A72193CF4E; Wed, 26 Apr 2017 11:05:42 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 64687219493F7 for ; Wed, 26 Apr 2017 11:05:40 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP; 26 Apr 2017 11:05:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,255,1488873600"; d="scan'208";a="850119467" Received: from theros.lm.intel.com ([10.232.112.77]) by FMSMGA003.fm.intel.com with ESMTP; 26 Apr 2017 11:05:39 -0700 From: Ross Zwisler To: fstests@vger.kernel.org, Xiong Zhou , jmoyer@redhat.com, eguan@redhat.com Subject: [PATCH v3 1/2] xfs: fix incorrect argument count check Date: Wed, 26 Apr 2017 12:05:30 -0600 Message-Id: <20170426180531.26291-1-ross.zwisler@linux.intel.com> X-Mailer: git-send-email 2.9.3 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jan Kara , Andrew Morton , "Darrick J. Wong" , linux-nvdimm@lists.01.org, Christoph Hellwig , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP t_mmap_dio.c actually requires 4 arguments, not 3 as the current check enforces: # ./src/t_mmap_dio usage: t_mmap_dio # ./src/t_mmap_dio one two three open src(No such file or directory) len 0 (null) Signed-off-by: Ross Zwisler Fixes: 456581661b4d ("xfs: test per-inode DAX flag by IO") --- src/t_mmap_dio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/t_mmap_dio.c b/src/t_mmap_dio.c index 69b9ca8..6c8ca1a 100644 --- a/src/t_mmap_dio.c +++ b/src/t_mmap_dio.c @@ -39,7 +39,7 @@ int main(int argc, char **argv) char *dfile; unsigned long len, opt; - if (argc < 4) + if (argc < 5) usage(basename(argv[0])); while ((opt = getopt(argc, argv, "b")) != -1)