From patchwork Fri Jul 6 18:28:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Verma, Vishal L" X-Patchwork-Id: 10512311 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 B7388603D7 for ; Fri, 6 Jul 2018 18:28:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF7C023794 for ; Fri, 6 Jul 2018 18:28:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A2CD228717; Fri, 6 Jul 2018 18:28:52 +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=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, 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 5C11A23794 for ; Fri, 6 Jul 2018 18:28:52 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 676D020336AD8; Fri, 6 Jul 2018 11:28:51 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=vishal.l.verma@intel.com; receiver=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 A895D211F8868 for ; Fri, 6 Jul 2018 11:28:50 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Jul 2018 11:28:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,317,1526367600"; d="scan'208";a="72800963" Received: from vverma7-desk1.lm.intel.com ([10.232.112.133]) by orsmga002.jf.intel.com with ESMTP; 06 Jul 2018 11:28:49 -0700 From: Vishal Verma To: Subject: [ndctl PATCH] libndctl: fix the uninject-error API actually injecting errors Date: Fri, 6 Jul 2018 12:28:41 -0600 Message-Id: <20180706182841.16869-1-vishal.l.verma@intel.com> X-Mailer: git-send-email 2.14.4 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomasz Rochumski MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP The addition of the v2 APIs introduced a bug when they rerouted the old APIs to call the new v2 ones. ndctl_namespace_uninject_error() called ndctl_namespace_inject_error2() instead of ndctl_namespace_uninject_error2(). Reported-by: Tomasz Rochumski Signed-off-by: Vishal Verma Acked-by: Dan Williams --- ndctl/lib/inject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndctl/lib/inject.c b/ndctl/lib/inject.c index 848f8a9..f9da02d 100644 --- a/ndctl/lib/inject.c +++ b/ndctl/lib/inject.c @@ -271,7 +271,7 @@ NDCTL_EXPORT int ndctl_namespace_uninject_error2(struct ndctl_namespace *ndns, NDCTL_EXPORT int ndctl_namespace_uninject_error(struct ndctl_namespace *ndns, unsigned long long block, unsigned long long count) { - return ndctl_namespace_inject_error2(ndns, block, count, 0); + return ndctl_namespace_uninject_error2(ndns, block, count, 0); } static int bb_add_record(struct list_head *h, u64 block, u64 count)