diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2021-01-25 10:16:15 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-01-25 12:32:26 -0800 |
commit | f8ad8187c3b536ee2b10502a8340c014204a1af0 (patch) | |
tree | 0f6d751ef9f44db7d0438f3b75eee6a3fff75ddb /drivers/target/target_core_xcopy.c | |
parent | 9f12e37cae44a96132fc3031535a0b165486941a (diff) | |
download | linux-f8ad8187c3b536ee2b10502a8340c014204a1af0.tar.bz2 |
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>
Diffstat (limited to 'drivers/target/target_core_xcopy.c')
0 files changed, 0 insertions, 0 deletions