From: Yangtao Li <frank.li@vivo.com>
To: Tyler Hicks <code@tyhicks.com>
Cc: Yangtao Li <frank.li@vivo.com>,
ecryptfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [RESEND] ecryptfs: make splice write available again
Date: Sat, 8 Apr 2023 03:36:42 +0800 [thread overview]
Message-ID: <20230407193642.39243-1-frank.li@vivo.com> (raw)
Since 5.10, splice() or sendfile() return EINVAL. This was
caused by commit 36e2c7421f02 ("fs: don't allow splice read/write
without explicit ops").
This patch initializes the splice_write field in file_operations, like
most file systems do, to restore the functionality.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
fs/ecryptfs/file.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c
index 268b74499c28..2c9c2af74785 100644
--- a/fs/ecryptfs/file.c
+++ b/fs/ecryptfs/file.c
@@ -415,4 +415,5 @@ const struct file_operations ecryptfs_main_fops = {
.fsync = ecryptfs_fsync,
.fasync = ecryptfs_fasync,
.splice_read = generic_file_splice_read,
+ .splice_write = iter_file_splice_write,
};
--
2.35.1
reply other threads:[~2023-04-07 19:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230407193642.39243-1-frank.li@vivo.com \
--to=frank.li@vivo.com \
--cc=code@tyhicks.com \
--cc=ecryptfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).