tty: implement write_iter
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 19 Jan 2021 19:41:16 +0000 (11:41 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 21 Jan 2021 00:48:47 +0000 (16:48 -0800)
commit9bb48c82aced07698a2d08ee0f1475a6c4f6b266
tree32628e37f8e7fdc03eb2c65a850ab860cf892d5d
parent2c85ebc57b3e1817b6ce1a6b703928e113a90442
tty: implement write_iter

This makes the tty layer use the .write_iter() function instead of the
traditional .write() functionality.

That allows writev(), but more importantly also makes it possible to
enable .splice_write() for ttys, reinstating the "splice to tty"
functionality that was lost in commit 36e2c7421f02 ("fs: don't allow
splice read/write without explicit ops").

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