[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210125183224.530014072@linuxfoundation.org>
Date: Mon, 25 Jan 2021 19:40:20 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Siddharth Gupta <sidgup@...eaurora.org>,
Christoph Hellwig <hch@....de>
Subject: [PATCH 5.10 198/199] kernfs: wire up ->splice_read and ->splice_write
From: Christoph Hellwig <hch@....de>
commit f2d6c2708bd84ca953fa6b6ca5717e79eb0140c7 upstream.
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@...eaurora.org>
Tested-by: Siddharth Gupta <sidgup@...eaurora.org>
Signed-off-by: Christoph Hellwig <hch@....de>
Link: https://lore.kernel.org/r/20210120204631.274206-4-hch@lst.de
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
fs/kernfs/file.c | 2 ++
1 file changed, 2 insertions(+)
--- a/fs/kernfs/file.c
+++ b/fs/kernfs/file.c
@@ -949,6 +949,8 @@ const struct file_operations kernfs_file
.release = kernfs_fop_release,
.poll = kernfs_fop_poll,
.fsync = noop_fsync,
+ .splice_read = generic_file_splice_read,
+ .splice_write = iter_file_splice_write,
};
/**
Powered by blists - more mailing lists