Johannes Berg f8ad8187c3 fs/pipe: allow sendfile() to pipe again
After commit 36e2c7421f02 ("fs: don't allow splice read/write
without explicit ops") sendfile() could no longer send data
from a real file to a pipe, breaking for example certain cgit
setups (e.g. when running behind fcgiwrap), because in this
case cgit will try to do exactly this: sendfile() to a pipe.

Fix this by using iter_file_splice_write for the splice_write
method of pipes, as suggested by Christoph.

Cc: stable@vger.kernel.org
Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops")
Suggested-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Tested-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-01-25 12:32:26 -08:00
..
2020-12-21 10:28:02 -08:00
2021-01-20 14:15:33 -08:00
2020-12-17 11:18:00 -08:00
2021-01-15 14:54:24 -08:00
2020-12-17 11:18:00 -08:00
2020-12-10 15:33:14 +01:00
2020-12-14 15:26:14 +01:00
2020-12-17 13:22:17 -08:00
\n
2020-12-17 11:00:37 -08:00
2020-09-10 14:03:31 -07:00
2020-12-18 12:50:18 -08:00
2021-01-04 09:06:42 +09:00
2020-12-16 12:57:51 -08:00
2020-12-15 22:46:19 -08:00
\n
2020-10-15 15:03:10 -07:00
2020-12-19 11:18:38 -08:00
2020-08-04 21:02:38 -04:00
2020-12-16 12:57:51 -08:00
2020-07-31 08:16:01 +02:00
2020-08-07 11:33:24 -07:00
2020-12-17 11:18:00 -08:00
2020-10-23 11:33:41 -07:00
2020-08-19 14:14:19 +02:00
2021-01-25 12:32:26 -08:00
2020-10-23 11:33:41 -07:00
2020-07-31 08:16:00 +02:00
2020-10-24 12:40:18 -07:00
2020-09-26 22:55:05 -04:00
2020-12-01 14:53:39 -07:00
2020-12-01 14:53:39 -07:00
2020-06-09 15:40:50 -07:00
2020-07-31 08:16:01 +02:00