[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240411153126.16201-207-axboe@kernel.dk>
Date: Thu, 11 Apr 2024 09:15:46 -0600
From: Jens Axboe <axboe@...nel.dk>
To: linux-kernel@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 206/437] virt: convert to ->read_iter and ->write_iter
Signed-off-by: Jens Axboe <axboe@...nel.dk>
---
virt/kvm/kvm_main.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index fb49c2a60200..9530584af843 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -4373,6 +4373,7 @@ static ssize_t kvm_vcpu_stats_read(struct file *file, char __user *user_buffer,
&kvm_vcpu_stats_desc[0], &vcpu->stat,
sizeof(vcpu->stat), user_buffer, size, offset);
}
+FOPS_READ_ITER_HELPER(kvm_vcpu_stats_read);
static int kvm_vcpu_stats_release(struct inode *inode, struct file *file)
{
@@ -4384,7 +4385,7 @@ static int kvm_vcpu_stats_release(struct inode *inode, struct file *file)
static const struct file_operations kvm_vcpu_stats_fops = {
.owner = THIS_MODULE,
- .read = kvm_vcpu_stats_read,
+ .read_iter = kvm_vcpu_stats_read_iter,
.release = kvm_vcpu_stats_release,
.llseek = noop_llseek,
};
@@ -5064,6 +5065,7 @@ static ssize_t kvm_vm_stats_read(struct file *file, char __user *user_buffer,
&kvm_vm_stats_desc[0], &kvm->stat,
sizeof(kvm->stat), user_buffer, size, offset);
}
+FOPS_READ_ITER_HELPER(kvm_vm_stats_read);
static int kvm_vm_stats_release(struct inode *inode, struct file *file)
{
@@ -5075,7 +5077,7 @@ static int kvm_vm_stats_release(struct inode *inode, struct file *file)
static const struct file_operations kvm_vm_stats_fops = {
.owner = THIS_MODULE,
- .read = kvm_vm_stats_read,
+ .read_iter = kvm_vm_stats_read_iter,
.release = kvm_vm_stats_release,
.llseek = noop_llseek,
};
@@ -6153,8 +6155,8 @@ static const struct file_operations stat_fops_per_vm = {
.owner = THIS_MODULE,
.open = kvm_stat_data_open,
.release = kvm_debugfs_release,
- .read = simple_attr_read,
- .write = simple_attr_write,
+ .read_iter = simple_attr_read_iter,
+ .write_iter = simple_attr_write_iter,
.llseek = no_llseek,
};
--
2.43.0
Powered by blists - more mailing lists