path: root/drivers/nvdimm/btt.c
diff options
authorVishal Verma <vishal.l.verma@intel.com>2017-08-30 19:35:58 -0600
committerDan Williams <dan.j.williams@intel.com>2017-08-31 14:31:38 -0700
commit1db1f3cea1d8886c686832d4618b346ae16c03c8 (patch)
treece3cec4310270efbfec5b124ff5439e62e4bf26e /drivers/nvdimm/btt.c
parenta15797f4bef201544263ef5c264c3f48d78cc5d4 (diff)
libnvdimm, btt: fix a missed NVDIMM_IO_ATOMIC case in the write path
The IO context conversion for rw_bytes missed a case in the BTT write path (btt_map_write) which should've been marked as atomic. In reality this should not cause a problem, because map writes are to small for nsio_rw_bytes to attempt error clearing, but it should be fixed for posterity. Add a might_sleep() in the non-atomic section of nsio_rw_bytes so that things like the nfit unit tests, which don't actually sleep, can catch bugs like this. 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>
Diffstat (limited to 'drivers/nvdimm/btt.c')
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
index 7ec6393b6ba1..a5e4134e1ed0 100644
--- a/drivers/nvdimm/btt.c
+++ b/drivers/nvdimm/btt.c
@@ -1156,7 +1156,8 @@ static int btt_write_pg(struct btt *btt, struct bio_integrity_payload *bip,
if (ret)
goto out_map;
- ret = btt_map_write(arena, premap, new_postmap, 0, 0, 0);
+ ret = btt_map_write(arena, premap, new_postmap, 0, 0,
if (ret)
goto out_map;

Privacy Policy