Skip to contentSkip to conversation

sysctl: wire up ->splice_read and ->splice_write

PATCH New Christoph Hellwig 1 participant 1 message Sep 4, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sysctl: wire up ->splice_read and ->splice_write

Make sure the kernel_write that the init code uses to apply sysctl values from the kernel command line keeps working without set_fs().

---

This could be folded into "sysctl: Convert to iter interfaces".

 fs/proc/proc_sysctl.c | 2 ++
 1 file changed, 2 insertions(+)
fs/proc/proc_sysctl.c +2 -0
index a4a3122f8a584a..317899222d7fdf 100644
@@ -853,6 +853,8 @@ static const struct file_operations proc_sys_file_operations = {
 	.poll		= proc_sys_poll,
 	.read_iter	= proc_sys_read,
 	.write_iter	= proc_sys_write,
+	.splice_read	= generic_file_splice_read,
+	.splice_write	= iter_file_splice_write,
 	.llseek		= default_llseek,
 };
 
Signature · 1 line
2.28.0