提交 9dc1e492 编写于 作者: D Dan Williams

dax: unmap/truncate on device shutdown

Invalidate all mappings of a device-dax instance when the device is
unregistered.
Signed-off-by: NDan Williams <dan.j.williams@intel.com>
上级 3bc52c45
...@@ -550,6 +550,7 @@ static void unregister_dax_dev(void *dev) ...@@ -550,6 +550,7 @@ static void unregister_dax_dev(void *dev)
*/ */
dax_dev->alive = false; dax_dev->alive = false;
synchronize_rcu(); synchronize_rcu();
unmap_mapping_range(dax_dev->inode->i_mapping, 0, 0, 1);
cdev_del(cdev); cdev_del(cdev);
device_unregister(dev); device_unregister(dev);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册