splice: lock the pages and unlock the pipe during IO
This is already what we do for page cache pages, where we can add raw
pages that are not up-to-date yet to the pipe, and the readers call the
pipe buffer '->confirm()' function to wait for the data to be ready.
So just do the same for splice reading, allowing us to unlock the pipe
during the read. That then avoids problems with users that get blocked
on the pipe lock.
Now they get blocked on the pipe buffer ->confirm() instead.
TODO: teach 'O_NDELAY' and select/poll about this too.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
4 files changed