forked from luck/tmp_suning_uos_patched
eb82199e37
commit a2948b17f6b936fc52f86c0f92c46d2f91928b79 upstream.
In case a platform doesn't provide explicit flush-hints but provides an
explicit flush callback via ND_REGION_ASYNC region flag, then
nvdimm_has_flush() still returns '0' indicating that writes do not
require flushing. This happens on PPC64 with patch at [1] applied, where
'deep_flush' of a region was denied even though an explicit flush
function was provided.
Fix this by adding a condition to nvdimm_has_flush() to test for the
ND_REGION_ASYNC flag on the region and see if a 'region->flush' callback
is assigned.
Link: http://lore.kernel.org/r/161703936121.36.7260632399582101498.stgit@e1fbed493c87 [1]
Fixes:
|
||
---|---|---|
.. | ||
badrange.c | ||
blk.c | ||
btt_devs.c | ||
btt.c | ||
btt.h | ||
bus.c | ||
claim.c | ||
core.c | ||
dax_devs.c | ||
dimm_devs.c | ||
dimm.c | ||
e820.c | ||
Kconfig | ||
label.c | ||
label.h | ||
Makefile | ||
namespace_devs.c | ||
nd_virtio.c | ||
nd-core.h | ||
nd.h | ||
of_pmem.c | ||
pfn_devs.c | ||
pfn.h | ||
pmem.c | ||
pmem.h | ||
region_devs.c | ||
region.c | ||
security.c | ||
virtio_pmem.c | ||
virtio_pmem.h |