[PATCH v7 06/16] KVM: Remove unused file_is_kvm
From: Aneesh Kumar K.V (Arm)
Date: Thu Oct 08 2026 - 02:05:49 EST
From: Steffen Eiden <seiden@xxxxxxxxxxxxx>
Remove the now unused file_is_kvm function.
Signed-off-by: Steffen Eiden <seiden@xxxxxxxxxxxxx>
Acked-by: Sean Christopherson <seanjc@xxxxxxxxxx>
Acked-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
---
include/linux/kvm_host.h | 1 -
virt/kvm/kvm_main.c | 6 ------
2 files changed, 7 deletions(-)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 3c5a389361c6..586f6e8bb81b 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -1087,7 +1087,6 @@ void kvm_exit(void);
void kvm_get_kvm(struct kvm *kvm);
bool kvm_get_kvm_safe(struct kvm *kvm);
void kvm_put_kvm(struct kvm *kvm);
-bool file_is_kvm(struct file *file);
/*
* Architectures define kvm_file_to_kvm_arch to <arch>
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index ff4fab9753ca..60e614795a36 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -5515,12 +5515,6 @@ static struct file_operations kvm_vm_fops = {
KVM_COMPAT(kvm_vm_compat_ioctl),
};
-bool file_is_kvm(struct file *file)
-{
- return file && file->f_op == &kvm_vm_fops;
-}
-EXPORT_SYMBOL_FOR_KVM_INTERNAL(file_is_kvm);
-
#ifdef kvm_file_to_kvm_arch
struct kvm *kvm_file_to_kvm_fn(struct file *file)
{
--
2.43.0