KVM: set no_llseek in stat_fops_per_vm
authorGeliang Tang <geliangtang@gmail.com>
Sat, 6 May 2017 15:37:19 +0000 (23:37 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 9 May 2017 09:48:23 +0000 (11:48 +0200)
In vm_stat_get_per_vm_fops and vcpu_stat_get_per_vm_fops, since we
use nonseekable_open() to open, we should use no_llseek() to seek,
not generic_file_llseek().

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/kvm_main.c

index b3d151ee2a672eb5ffc509f64d9fdb56705a80f4..a9a04625bb61f87e2705e89c06574e44e5ddaa43 100644 (file)
@@ -3715,7 +3715,7 @@ static const struct file_operations vm_stat_get_per_vm_fops = {
        .release = kvm_debugfs_release,
        .read    = simple_attr_read,
        .write   = simple_attr_write,
-       .llseek  = generic_file_llseek,
+       .llseek  = no_llseek,
 };
 
 static int vcpu_stat_get_per_vm(void *data, u64 *val)
@@ -3760,7 +3760,7 @@ static const struct file_operations vcpu_stat_get_per_vm_fops = {
        .release = kvm_debugfs_release,
        .read    = simple_attr_read,
        .write   = simple_attr_write,
-       .llseek  = generic_file_llseek,
+       .llseek  = no_llseek,
 };
 
 static const struct file_operations *stat_fops_per_vm[] = {