mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
libnvdimm: fix the clear-error check in nsio_rw_bytes
commit7e5a21dfe5upstream. 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:3ae3d67ba7("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c321011260
commit
e01c81e80d
@@ -260,8 +260,7 @@ static int nsio_rw_bytes(struct nd_namespace_common *ndns,
|
|||||||
* work around this collision.
|
* work around this collision.
|
||||||
*/
|
*/
|
||||||
if (IS_ALIGNED(offset, 512) && IS_ALIGNED(size, 512)
|
if (IS_ALIGNED(offset, 512) && IS_ALIGNED(size, 512)
|
||||||
&& !(flags & NVDIMM_IO_ATOMIC)
|
&& !(flags & NVDIMM_IO_ATOMIC)) {
|
||||||
&& !ndns->claim) {
|
|
||||||
long cleared;
|
long cleared;
|
||||||
|
|
||||||
cleared = nvdimm_clear_poison(&ndns->dev,
|
cleared = nvdimm_clear_poison(&ndns->dev,
|
||||||
|
|||||||
Reference in New Issue
Block a user