]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
proc "single files": switch to ->read_iter
authorGreg Kroah-Hartman <gregkh@google.com>
Wed, 4 Nov 2020 08:27:37 +0000 (09:27 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Nov 2020 18:05:18 +0000 (10:05 -0800)
Implement ->read_iter for all proc "single files" so that more bionic
tests cases can pass when they call splice() on other fun files like
/proc/version

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/generic.c

index 2f9fa179194d72739f9f76c9270068bbe89308a0..f81327673f4901fde5cd2a86f314ffca2065b248 100644 (file)
@@ -621,7 +621,7 @@ static int proc_single_open(struct inode *inode, struct file *file)
 static const struct proc_ops proc_single_ops = {
        /* not permanent -- can call into arbitrary ->single_show */
        .proc_open      = proc_single_open,
-       .proc_read      = seq_read,
+       .proc_read_iter = seq_read_iter,
        .proc_lseek     = seq_lseek,
        .proc_release   = single_release,
 };