mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 13:37:36 +02:00
UPSTREAM: kernfs: wire up ->splice_read and ->splice_write
Wire up the splice_read and splice_write methods to the default helpers using ->read_iter and ->write_iter now that those are implemented for kernfs. This restores support to use splice and sendfile on kernfs files. Fixes:36e2c7421f("fs: don't allow splice read/write without explicit ops") Reported-by: Siddharth Gupta <sidgup@codeaurora.org> Tested-by: Siddharth Gupta <sidgup@codeaurora.org> Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20210120204631.274206-4-hch@lst.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commitf2d6c2708b) Bug: 176079972 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I80f09db0b8569fa63db59ada9c3d45d6600b2d70
This commit is contained in:
parent
9cc0664497
commit
e181337957
|
|
@ -949,6 +949,8 @@ const struct file_operations kernfs_file_fops = {
|
|||
.release = kernfs_fop_release,
|
||||
.poll = kernfs_fop_poll,
|
||||
.fsync = noop_fsync,
|
||||
.splice_read = generic_file_splice_read,
|
||||
.splice_write = iter_file_splice_write,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user