tty, proc, kernfs, random: Use direct_splice_read()
authorDavid Howells <dhowells@redhat.com>
Wed, 15 Mar 2023 16:35:40 +0000 (16:35 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 15 Mar 2023 17:46:47 +0000 (11:46 -0600)
commit82ab8404c910d4aba33f55257c2bbc8ea9cfad3c
treeb48cdae158230d78cc82a4f6c7390e0b334ce7ed
parentf0daac2d4dcd286168d7c70d0495328c096d4d96
tty, proc, kernfs, random: Use direct_splice_read()

Use direct_splice_read() for tty, procfs, kernfs and random files rather
than going through generic_file_splice_read() as they just copy the file
into the output buffer and don't splice pages.  This avoids the need for
them to have a ->read_folio() to satisfy filemap_splice_read().

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cc: Christoph Hellwig <hch@lst.de>
cc: Jens Axboe <axboe@kernel.dk>
cc: Al Viro <viro@zeniv.linux.org.uk>
cc: John Hubbard <jhubbard@nvidia.com>
cc: David Hildenbrand <david@redhat.com>
cc: Matthew Wilcox <willy@infradead.org>
cc: Miklos Szeredi <miklos@szeredi.hu>
cc: Arnd Bergmann <arnd@arndb.de>
cc: linux-block@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
Link: https://lore.kernel.org/r/20230315163549.295454-2-dhowells@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/char/random.c
drivers/tty/tty_io.c
fs/kernfs/file.c
fs/proc/inode.c
fs/proc/proc_sysctl.c
fs/proc_namespace.c