Skip to content

Commit

Permalink
KVM: set no_llseek in stat_fops_per_vm
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
geliangtang authored and bonzini committed May 9, 2017
1 parent 2868b25 commit 3bed888
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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[] = {
Expand Down

0 comments on commit 3bed888

Please sign in to comment.