tty, proc, kernfs, random: Use direct_splice_read()
authorDavid Howells <dhowells@redhat.com>
Mon, 13 Feb 2023 20:38:45 +0000 (20:38 +0000)
committerDavid Howells <dhowells@redhat.com>
Tue, 14 Feb 2023 17:08:58 +0000 (17:08 +0000)
commit5c93cead0175f9f8747d073c34cf999ed1af0156
treea9ada12fb9c2e54571b989bad775e639ea44514c
parent508918ec20c1e4db5dd4ff9434b14aea1ebbbf8e
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>
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cc: linux-block@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
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