diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2026-04-07 19:59:34 +0200 |
|---|---|---|
| committer | Alex Williamson <alex@shazbot.org> | 2026-04-10 13:32:25 -0600 |
| commit | 3c443ec743422442229a9c93ac6e4e5d188bc41a (patch) | |
| tree | e75c235a8fd3f341bfa4d6db0373d1761457e1b7 /drivers/vfio | |
| parent | 7487d8db3336839567aabae24618a4f2f2f2adad (diff) | |
| download | linux-next-3c443ec743422442229a9c93ac6e4e5d188bc41a.tar.gz linux-next-3c443ec743422442229a9c93ac6e4e5d188bc41a.zip | |
vfio: remove dead notifier code
group->notifier is dead code. VFIO initializes it and checks it for
emptiness on teardown, but nobody ever registers on it or triggers it.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Anthony Krowiak <akrowiak@linux.ibm.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20260407175934.1602711-1-pbonzini@redhat.com
Signed-off-by: Alex Williamson <alex@shazbot.org>
Diffstat (limited to 'drivers/vfio')
| -rw-r--r-- | drivers/vfio/group.c | 3 | ||||
| -rw-r--r-- | drivers/vfio/vfio.h | 1 | ||||
| -rw-r--r-- | drivers/vfio/vfio_iommu_type1.c | 1 |
3 files changed, 0 insertions, 5 deletions
diff --git a/drivers/vfio/group.c b/drivers/vfio/group.c index d4a53f8c5be0..b2299e5bc6df 100644 --- a/drivers/vfio/group.c +++ b/drivers/vfio/group.c @@ -461,7 +461,6 @@ static int vfio_group_fops_release(struct inode *inode, struct file *filep) * Device FDs hold a group file reference, therefore the group release * is only called when there are no open devices. */ - WARN_ON(group->notifier.head); if (group->container) vfio_group_detach_container(group); if (group->iommufd) { @@ -546,7 +545,6 @@ static struct vfio_group *vfio_group_alloc(struct iommu_group *iommu_group, /* put in vfio_group_release() */ iommu_group_ref_get(iommu_group); group->type = type; - BLOCKING_INIT_NOTIFIER_HEAD(&group->notifier); return group; } @@ -725,7 +723,6 @@ void vfio_device_remove_group(struct vfio_device *device) * properly hold the group reference. */ WARN_ON(!list_empty(&group->device_list)); - WARN_ON(group->notifier.head); /* * Revoke all users of group->iommu_group. At this point we know there diff --git a/drivers/vfio/vfio.h b/drivers/vfio/vfio.h index 50128da18bca..0854f3fa1a22 100644 --- a/drivers/vfio/vfio.h +++ b/drivers/vfio/vfio.h @@ -90,7 +90,6 @@ struct vfio_group { struct mutex group_lock; struct kvm *kvm; struct file *opened_file; - struct blocking_notifier_head notifier; struct iommufd_ctx *iommufd; spinlock_t kvm_ref_lock; unsigned int cdev_device_open_cnt; diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c index 03cefdf99a4a..c8151ba54de3 100644 --- a/drivers/vfio/vfio_iommu_type1.c +++ b/drivers/vfio/vfio_iommu_type1.c @@ -36,7 +36,6 @@ #include <linux/uaccess.h> #include <linux/vfio.h> #include <linux/workqueue.h> -#include <linux/notifier.h> #include <linux/mm_inline.h> #include <linux/overflow.h> #include "vfio.h" |
