tty: implement read_iter
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 19 Jan 2021 18:49:19 +0000 (10:49 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 21 Jan 2021 00:48:47 +0000 (16:48 -0800)
commitdd78b0c483e33225e0e0782b0ed887129b00f956
tree4c44382f91a326c8c3990e7949fc8445e57a5f58
parent3b830a9c34d5897be07176ce4e6f2d75e2c8cfd7
tty: implement read_iter

Now that the ldisc read() function takes kernel pointers, it's fairly
straightforward to make the tty file operations use .read_iter() instead
of .read().

That automatically gives us vread() and friends, and also makes it
possible to do .splice_read() on ttys again.

Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops")
Reported-by: Oliver Giles <ohw.giles@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/tty/tty_io.c