summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2017-05-06 23:37:19 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2017-05-09 11:48:23 +0200
commit3bed8888edc8f60d734c44fdcdb7c6abd5e2d02e (patch)
tree03a6ad9107fe3687cf105c1fcf6de9a6b64a9a60 /virt
parent2868b2513aa732a99ea4a0a6bf10dc93c1f3dac2 (diff)
downloadlinux-stable-3bed8888edc8f60d734c44fdcdb7c6abd5e2d02e.tar.gz
linux-stable-3bed8888edc8f60d734c44fdcdb7c6abd5e2d02e.tar.bz2
linux-stable-3bed8888edc8f60d734c44fdcdb7c6abd5e2d02e.zip
KVM: set no_llseek in stat_fops_per_vm
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>
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/kvm_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index b3d151ee2a67..a9a04625bb61 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -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[] = {