Skip to content

Commit e400be6

Browse files
shkim-rcrostedt
authored andcommitted
tracing: Make splice_read available again
Since the commit 36e2c74 ("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/[email protected] Cc: [email protected] Fixes: 36e2c74 ("fs: don't allow splice read/write without explicit ops") Signed-off-by: Sung-hun Kim <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 8732565 commit e400be6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/trace/trace.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5164,6 +5164,8 @@ loff_t tracing_lseek(struct file *file, loff_t offset, int whence)
51645164
static const struct file_operations tracing_fops = {
51655165
.open = tracing_open,
51665166
.read = seq_read,
5167+
.read_iter = seq_read_iter,
5168+
.splice_read = generic_file_splice_read,
51675169
.write = tracing_write_stub,
51685170
.llseek = tracing_lseek,
51695171
.release = tracing_release,

0 commit comments

Comments
 (0)