Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9dc1e492 authored by Dan Williams's avatar Dan Williams
Browse files

dax: unmap/truncate on device shutdown



Invalidate all mappings of a device-dax instance when the device is
unregistered.

Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 3bc52c45
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -550,6 +550,7 @@ static void unregister_dax_dev(void *dev)
	 */
	dax_dev->alive = false;
	synchronize_rcu();
	unmap_mapping_range(dax_dev->inode->i_mapping, 0, 0, 1);
	cdev_del(cdev);
	device_unregister(dev);
}