diff options
author | Christoph Hellwig <hch@lst.de> | 2021-01-20 21:46:31 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-01-21 18:30:28 +0100 |
commit | f2d6c2708bd84ca953fa6b6ca5717e79eb0140c7 (patch) | |
tree | 9df0c46298ea06821ad05d4cfd2ce1ab2e36ea38 /fs/kernfs | |
parent | cc099e0b399889c6485c88368b19824b087c9f8c (diff) | |
download | lwn-f2d6c2708bd84ca953fa6b6ca5717e79eb0140c7.tar.gz lwn-f2d6c2708bd84ca953fa6b6ca5717e79eb0140c7.zip |
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: 36e2c7421f02 ("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>
Diffstat (limited to 'fs/kernfs')
-rw-r--r-- | fs/kernfs/file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c index b1a5cccf189e..c75719312147 100644 --- a/fs/kernfs/file.c +++ b/fs/kernfs/file.c @@ -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, }; /** |