proc/stat: switch to ->read_iter
authorChristoph Hellwig <hch@lst.de>
Wed, 4 Nov 2020 08:27:36 +0000 (09:27 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Nov 2020 18:05:18 +0000 (10:05 -0800)
Implement ->read_iter so that splice can be used on this file.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/stat.c

index 46b3293..4695b6d 100644 (file)
@@ -226,7 +226,7 @@ static int stat_open(struct inode *inode, struct file *file)
 static const struct proc_ops stat_proc_ops = {
        .proc_flags     = PROC_ENTRY_PERMANENT,
        .proc_open      = stat_open,
-       .proc_read      = seq_read,
+       .proc_read_iter = seq_read_iter,
        .proc_lseek     = seq_lseek,
        .proc_release   = single_release,
 };