]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
Merge branch 'for-4.10/libnvdimm' into libnvdimm-for-next
authorDan Williams <dan.j.williams@intel.com>
Sat, 17 Dec 2016 23:08:10 +0000 (15:08 -0800)
committerDan Williams <dan.j.williams@intel.com>
Sat, 17 Dec 2016 23:08:10 +0000 (15:08 -0800)
1  2 
drivers/dax/dax.c
drivers/dax/pmem.c
drivers/nvdimm/namespace_devs.c
drivers/nvdimm/pmem.c
tools/testing/nvdimm/test/nfit.c

Simple merge
Simple merge
Simple merge
index 24618431a14bae7e891438b3601d017d1d34db4d,ecf79fd64517236049dbf6c6cdb2612d927aa23c..7282d7495bf1f0a1bf6685012dafb1d9cc60bfa4
@@@ -53,21 -53,23 +53,24 @@@ static int pmem_clear_poison(struct pme
        struct device *dev = to_dev(pmem);
        sector_t sector;
        long cleared;
+       int rc = 0;
  
        sector = (offset - pmem->data_offset) / 512;
-       cleared = nvdimm_clear_poison(dev, pmem->phys_addr + offset, len);
  
+       cleared = nvdimm_clear_poison(dev, pmem->phys_addr + offset, len);
+       if (cleared < len)
+               rc = -EIO;
        if (cleared > 0 && cleared / 512) {
-               dev_dbg(dev, "%s: %#llx clear %ld sector%s\n",
-                               __func__, (unsigned long long) sector,
-                               cleared / 512, cleared / 512 > 1 ? "s" : "");
-               badblocks_clear(&pmem->bb, sector, cleared / 512);
-       } else {
-               return -EIO;
+               cleared /= 512;
+               dev_dbg(dev, "%s: %#llx clear %ld sector%s\n", __func__,
+                               (unsigned long long) sector, cleared,
+                               cleared > 1 ? "s" : "");
+               badblocks_clear(&pmem->bb, sector, cleared);
        }
 +
        invalidate_pmem(pmem->virt_addr + offset, len);
-       return 0;
+       return rc;
  }
  
  static void write_pmem(void *pmem_addr, struct page *page,
Simple merge