]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
random: wire up fops->splice_{read,write}_iter()
authorJens Axboe <axboe@kernel.dk>
Thu, 19 May 2022 23:31:37 +0000 (17:31 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 May 2022 07:24:09 +0000 (09:24 +0200)
commit08467db994c0cf6c16e347a99e374a432e6c3509
tree51f8c41fbb31c0f364eb49424f94840706860ac8
parentfdb1b354e301dd2aa56df862b9d4894b79039c40
random: wire up fops->splice_{read,write}_iter()

commit 79025e727a846be6fd215ae9cdb654368ac3f9a6 upstream.

Now that random/urandom is using {read,write}_iter, we can wire it up to
using the generic splice handlers.

Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
[Jason: added the splice_write path. Note that sendfile() and such still
 does not work for read, though it does for write, because of a file
 type restriction in splice_direct_to_actor(), which I'll address
 separately.]
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/random.c