From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753710AbdGYTYX (ORCPT ); Tue, 25 Jul 2017 15:24:23 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:35954 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752035AbdGYTYR (ORCPT ); Tue, 25 Jul 2017 15:24:17 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dave Jiang , Dan Williams , Vishal Verma Subject: [PATCH 4.12 082/196] libnvdimm: fix the clear-error check in nsio_rw_bytes Date: Tue, 25 Jul 2017 12:21:21 -0700 Message-Id: <20170725192050.639944608@linuxfoundation.org> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170725192046.422343510@linuxfoundation.org> References: <20170725192046.422343510@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Vishal Verma commit 7e5a21dfe5524a85705d3bc7b540c849cc13e9a1 upstream. A leftover from the 'bandaid' fix that disabled BTT error clearing in rw_bytes resulted in an incorrect check. After we converted these checks over to use the NVDIMM_IO_ATOMIC flag, the ndns->claim check was both redundant, and incorrect. Remove it. Fixes: 3ae3d67ba705 ("libnvdimm: add an atomic vs process context flag to rw_bytes") Cc: Dave Jiang Cc: Dan Williams Signed-off-by: Vishal Verma Signed-off-by: Dan Williams Signed-off-by: Greg Kroah-Hartman --- drivers/nvdimm/claim.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/nvdimm/claim.c +++ b/drivers/nvdimm/claim.c @@ -260,8 +260,7 @@ static int nsio_rw_bytes(struct nd_names * work around this collision. */ if (IS_ALIGNED(offset, 512) && IS_ALIGNED(size, 512) - && !(flags & NVDIMM_IO_ATOMIC) - && !ndns->claim) { + && !(flags & NVDIMM_IO_ATOMIC)) { long cleared; cleared = nvdimm_clear_poison(&ndns->dev,