memremap: fix softlockup reports at teardown
authorDan Williams <[email protected]>
Wed, 7 Feb 2018 03:34:11 +0000 (19:34 -0800)
committerDan Williams <[email protected]>
Sat, 3 Mar 2018 03:34:50 +0000 (19:34 -0800)
commit949b93250a566cc7a578b4f829cf76b70d19a62c
tree4c0dafd885b4d37cc1edd6cd295986746391e624
parent5fdf8e5ba5666fe153bd61f851a40078a6347822
memremap: fix softlockup reports at teardown

The cond_resched() currently in the setup path needs to be duplicated in
the teardown path. Rather than require each instance of
for_each_device_pfn() to open code the same sequence, embed it in the
helper.

Link: https://github.com/intel/ixpdimm_sw/issues/11
Cc: "Jérôme Glisse" <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: <[email protected]>
Fixes: 71389703839e ("mm, zone_device: Replace {get, put}_zone_device_page()...")
Signed-off-by: Dan Williams <[email protected]>
kernel/memremap.c