summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2022-05-19 13:26:55 -0600
committerJens Axboe <axboe@kernel.dk>2022-05-19 15:01:31 -0600
commitfd673dac9f7c905d95cbe334cc7519fb36ede678 (patch)
tree2006fe1f708a4408d3f854388bc8f9efb6e87f25
parentc65f0221b72173c19398884f3f49ef775e2c668f (diff)
random: wire up fops->splice_read_iter()random-splice
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 <axboe@kernel.dk>
-rw-r--r--drivers/char/random.c2
1 files changed, 2 insertions, 0 deletions
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,
};