Skip to content
Commit 1b057bd8 authored by Max Kellermann's avatar Max Kellermann Committed by Greg Kroah-Hartman
Browse files

drivers/char/mem: implement splice() for /dev/zero, /dev/full



This allows splicing zeroed pages into a pipe, and allows discarding
pages from a pipe by splicing them to /dev/zero.  Writing to /dev/zero
should have the same effect as writing to /dev/null, and a
"splice_write" implementation exists only for /dev/null.

(The /dev/zero splice_read implementation could be optimized by
pushing references to the global zero page to the pipe, but that's an
optimization for another day.)

Signed-off-by: default avatarMax Kellermann <max.kellermann@ionos.com>
Link: https://lore.kernel.org/r/20230919073743.1066313-1-max.kellermann@ionos.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 19e3e6cd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment