[PATCH 432/437] seq_file: switch to using ->read_iter()

Jens Axboe
2024-04-11T15:43:44Z

There's a seq_read_iter() helper already, use it.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
include/linux/seq_file.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index 234bcdb1fba4..a562c611ed3d 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -188,7 +188,7 @@ static int __name ## _open(struct inode *inode, struct file *file) \
static const struct file_operations __name ## _fops = { \
.owner = THIS_MODULE, \
.open = __name ## _open, \
- .read = seq_read, \
+ .read_iter = seq_read_iter, \
.llseek = seq_lseek, \
.release = seq_release, \
}
@@ -202,7 +202,7 @@ static int __name ## _open(struct inode *inode, struct file *file) \
static const struct file_operations __name ## _fops = { \
.owner = THIS_MODULE, \
.open = __name ## _open, \
- .read = seq_read, \
+ .read_iter = seq_read_iter, \
.llseek = seq_lseek, \
.release = single_release, \
}
@@ -216,8 +216,8 @@ static int __name ## _open(struct inode *inode, struct file *file) \
static const struct file_operations __name ## _fops = { \
.owner = THIS_MODULE, \
.open = __name ## _open, \
- .read = seq_read, \
- .write = __name ## _write, \
+ .read_iter = seq_read_iter, \
+ .write_iter = __name ## _write_iter, \
.llseek = seq_lseek, \
.release = single_release, \
}
--
2.43.0