Commit f2d6c270 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Greg Kroah-Hartman

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: 36e2c742 ("fs: don't allow splice read/write without explicit ops")
Reported-by: default avatarSiddharth Gupta <sidgup@codeaurora.org>
Tested-by: default avatarSiddharth Gupta <sidgup@codeaurora.org>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210120204631.274206-4-hch@lst.deSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cc099e0b
......@@ -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,
};
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment