diff options
author | David S. Miller <davem@davemloft.net> | 2019-10-05 22:37:23 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-05 22:37:23 +0200 |
commit | 6f4c930e02355664d89c976eccea5d999a90de16 (patch) | |
tree | bc08932fbf43b9560ba5bde3284674054e3b56eb /drivers/nvdimm/region_devs.c | |
parent | net: dsa: sja1105: Make function sja1105_xfer_long_buf static (diff) | |
parent | Merge tag 'kbuild-fixes-v5.4' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
download | linux-6f4c930e02355664d89c976eccea5d999a90de16.tar.xz linux-6f4c930e02355664d89c976eccea5d999a90de16.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Diffstat (limited to 'drivers/nvdimm/region_devs.c')
-rw-r--r-- | drivers/nvdimm/region_devs.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c index 3fd6b59abd33..ef423ba1a711 100644 --- a/drivers/nvdimm/region_devs.c +++ b/drivers/nvdimm/region_devs.c @@ -632,11 +632,11 @@ static umode_t region_visible(struct kobject *kobj, struct attribute *a, int n) if (!is_memory(dev) && a == &dev_attr_dax_seed.attr) return 0; - if (!is_nd_pmem(dev) && a == &dev_attr_badblocks.attr) + if (!is_memory(dev) && a == &dev_attr_badblocks.attr) return 0; if (a == &dev_attr_resource.attr) { - if (is_nd_pmem(dev)) + if (is_memory(dev)) return 0400; else return 0; @@ -1168,6 +1168,9 @@ EXPORT_SYMBOL_GPL(nvdimm_has_cache); bool is_nvdimm_sync(struct nd_region *nd_region) { + if (is_nd_volatile(&nd_region->dev)) + return true; + return is_nd_pmem(&nd_region->dev) && !test_bit(ND_REGION_ASYNC, &nd_region->flags); } |