]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
libnvdimm: fix the clear-error check in nsio_rw_bytes
authorVishal Verma <vishal.l.verma@intel.com>
Sat, 1 Jul 2017 00:32:52 +0000 (18:32 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2017 22:10:12 +0000 (15:10 -0700)
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 <dave.jiang@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvdimm/claim.c

index 7ceb5fa4f2a1343c0136cb56cdf887b4aeabac65..4baa4ce825ab859040578e92473b85e1aca1abdc 100644 (file)
@@ -260,8 +260,7 @@ static int nsio_rw_bytes(struct nd_namespace_common *ndns,
                 * 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,