From: Jens Axboe Date: Thu, 19 May 2022 19:26:55 +0000 (-0600) Subject: random: wire up fops->splice_read_iter() X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=refs%2Fheads%2Frandom-splice;p=linux-2.6-block.git random: wire up fops->splice_read_iter() Now that random/urandom is using read_iter, we can wire it up to using the generic splice read handler. Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops") Signed-off-by: Jens Axboe --- diff --git a/drivers/char/random.c b/drivers/char/random.c index 147921d471d8..892513fb7479 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -1415,6 +1415,7 @@ const struct file_operations random_fops = { .compat_ioctl = compat_ptr_ioctl, .fasync = random_fasync, .llseek = noop_llseek, + .splice_read = generic_file_splice_read, }; const struct file_operations urandom_fops = { @@ -1424,6 +1425,7 @@ const struct file_operations urandom_fops = { .compat_ioctl = compat_ptr_ioctl, .fasync = random_fasync, .llseek = noop_llseek, + .splice_read = generic_file_splice_read, };