diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:16:07 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:16:07 +0000 |
commit | ff146e0175fa9b27a6838c64c76f1e3d4b4cc6a6 (patch) | |
tree | eb37b8a1f852d4b842862b002c1da338ee11d9d2 /drivers/vfio/device_cdev.c | |
parent | Adding upstream version 6.9.10. (diff) | |
download | linux-upstream/6.9.11.tar.xz linux-upstream/6.9.11.zip |
Adding upstream version 6.9.11.upstream/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.c | 7 |
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: |