tracing: Make splice_read available again

Since the commit 36e2c7421f02 ("fs: don't allow splice read/write
without explicit ops") is applied to the kernel, splice() and
sendfile() calls on the trace file (/sys/kernel/debug/tracing
/trace) return EINVAL.

This patch restores these system calls by initializing splice_read
in file_operations of the trace file. This patch only enables such
functionalities for the read case.

Link: https://lore.kernel.org/linux-trace-kernel/20230314013707.28814-1-sfoon.kim@samsung.com

Cc: stable@vger.kernel.org
Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops")
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

authored by Sung-hun Kim and committed by Steven Rostedt (Google) e400be67 87325655

Changed files
+2
kernel
trace
+2
kernel/trace/trace.c
··· 5164 5164 static const struct file_operations tracing_fops = { 5165 5165 .open = tracing_open, 5166 5166 .read = seq_read, 5167 + .read_iter = seq_read_iter, 5168 + .splice_read = generic_file_splice_read, 5167 5169 .write = tracing_write_stub, 5168 5170 .llseek = tracing_lseek, 5169 5171 .release = tracing_release,