From: Yangtao Li <frank.li@vivo.com>
To: code@tyhicks.com
Cc: ecryptfs@vger.kernel.org, linux-kernel@vger.kernel.org,
Yangtao Li <frank.li@vivo.com>
Subject: [PATCH] ecryptfs: make splice write available again
Date: Wed, 31 Aug 2022 11:35:05 +0800 [thread overview]
Message-ID: <20220831033505.23178-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 18d5b91cb573..d070ca0fac2b 100644
--- a/fs/ecryptfs/file.c
+++ b/fs/ecryptfs/file.c
@@ -421,4 +421,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.25.1
next reply other threads:[~2022-08-31 3:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 3:35 Yangtao Li [this message]
2022-11-17 17:57 ` [PATCH] ecryptfs: make splice write available again Yangtao Li
2025-05-29 14:06 ` Subject: " Yangtao Li
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=20220831033505.23178-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).