summaryrefslogtreecommitdiffstats
path: root/drivers/vfio/device_cdev.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:16:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:16:15 +0000
commitb5d465a24babe0dbb7438a7ef28eb29a933de302 (patch)
tree7a1e797d75fc2668c2bead5c19f93e472d57a5e1 /drivers/vfio/device_cdev.c
parentReleasing progress-linux version 6.9.10-1~progress7.99u1. (diff)
downloadlinux-b5d465a24babe0dbb7438a7ef28eb29a933de302.tar.xz
linux-b5d465a24babe0dbb7438a7ef28eb29a933de302.zip
Merging upstream version 6.9.11.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/vfio/device_cdev.c')
-rw-r--r--drivers/vfio/device_cdev.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/vfio/device_cdev.c b/drivers/vfio/device_cdev.c
index e75da0a70d..bb1817bd4f 100644
--- a/drivers/vfio/device_cdev.c
+++ b/drivers/vfio/device_cdev.c
@@ -39,6 +39,13 @@ int vfio_device_fops_cdev_open(struct inode *inode, struct file *filep)
filep->private_data = df;
+ /*
+ * Use the pseudo fs inode on the device to link all mmaps
+ * to the same address space, allowing us to unmap all vmas
+ * associated to this device using unmap_mapping_range().
+ */
+ filep->f_mapping = device->inode->i_mapping;
+
return 0;
err_put_registration: