diff options
author | Christoph Hellwig <hch@lst.de> | 2021-12-15 11:45:07 +0300 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2021-12-18 19:04:52 +0300 |
commit | 30c6828a17a572aeb9e3a3bacce05fdcf1106541 (patch) | |
tree | a85d894c91319e9688c5b82ee35e87caf648eaa3 /drivers/nvdimm | |
parent | fd1d00ec92002d8fe28ca981a72395eaa7ae3d11 (diff) | |
download | linux-30c6828a17a572aeb9e3a3bacce05fdcf1106541.tar.xz |
dax: remove the DAXDEV_F_SYNC flag
Remove the DAXDEV_F_SYNC flag and thus the flags argument to alloc_dax and
just let the drivers call set_dax_synchronous directly.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Pankaj Gupta <pankaj.gupta@ionos.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Link: https://lore.kernel.org/r/20211215084508.435401-4-hch@lst.de
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm')
-rw-r--r-- | drivers/nvdimm/pmem.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c index d225bcfa67cf..18b1d9c55831 100644 --- a/drivers/nvdimm/pmem.c +++ b/drivers/nvdimm/pmem.c @@ -400,7 +400,6 @@ static int pmem_attach_disk(struct device *dev, struct gendisk *disk; void *addr; int rc; - unsigned long flags = 0UL; pmem = devm_kzalloc(dev, sizeof(*pmem), GFP_KERNEL); if (!pmem) @@ -493,13 +492,13 @@ static int pmem_attach_disk(struct device *dev, nvdimm_badblocks_populate(nd_region, &pmem->bb, &bb_range); disk->bb = &pmem->bb; - if (is_nvdimm_sync(nd_region)) - flags = DAXDEV_F_SYNC; - dax_dev = alloc_dax(pmem, &pmem_dax_ops, flags); + dax_dev = alloc_dax(pmem, &pmem_dax_ops); if (IS_ERR(dax_dev)) { rc = PTR_ERR(dax_dev); goto out; } + if (is_nvdimm_sync(nd_region)) + set_dax_synchronous(dax_dev); rc = dax_add_host(dax_dev, disk); if (rc) goto out_cleanup_dax; |