Re: [PATCH v3 1/2] kernfs, sysfs: add SYSFS_NO_SPLICE to refuse splice on writable opens
From: Tejun Heo
Date: Thu Nov 12 2026 - 10:29:27 EST
Hello, Krystian.
On Thu, Nov 12, 2026 at 03:17:01PM +0100, Krystian Kaniewski wrote:
> Read-only opens keep splice support because they cannot reach
> ->write().
The patch looks fine to me, but I'm not sure whether the read-only
exemption is necessary. Is it addressing an actual problem? busybox, for
example, just falls back to regular reads when sendfile() fails with
-EINVAL, and refusing splice reads on read-write opens while allowing them
on read-only ones seems more confusing than anything else. Would it be
simpler to refuse splice for all opens of the file?
Thanks.
--
tejun