fs: add 'nonblock' parameter to pipe_buf_confirm() and fops method
authorJens Axboe <axboe@kernel.dk>
Wed, 8 Mar 2023 00:51:47 +0000 (17:51 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 15 Mar 2023 01:54:57 +0000 (19:54 -0600)
commit00ff2f5b7a96edf9fbb2dda1c253ac5b06a8a05e
tree5e3d52d76457f7c49b223183a590668616e7f573
parenteeac8ede17557680855031c6f305ece2378af326
fs: add 'nonblock' parameter to pipe_buf_confirm() and fops method

In preparation for being able to do a nonblocking confirm attempt of a
pipe buffer, plumb a parameter through the stack to indicate if this is
a nonblocking attempt or not.

Each caller is passing down 'false' right now, but the only confirm
method in the tree, page_cache_pipe_buf_confirm(), is converted to do a
trylock_page() if nonblock == true.

Acked-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/fuse/dev.c
fs/pipe.c
fs/splice.c
include/linux/pipe_fs_i.h