From: Yangtao Li <frank.li@vivo.com>
To: slava@dubeyko.com, glaubitz@physik.fu-berlin.de,
Yangtao Li <frank.li@vivo.com>, Kees Cook <kees@kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] hfs: make splice write available again
Date: Thu, 29 May 2025 08:00:32 -0600 [thread overview]
Message-ID: <20250529140033.2296791-2-frank.li@vivo.com> (raw)
In-Reply-To: <20250529140033.2296791-1-frank.li@vivo.com>
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.
Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops")
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
fs/hfs/inode.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c
index a81ce7a740b9..451115360f73 100644
--- a/fs/hfs/inode.c
+++ b/fs/hfs/inode.c
@@ -692,6 +692,7 @@ static const struct file_operations hfs_file_operations = {
.write_iter = generic_file_write_iter,
.mmap = generic_file_mmap,
.splice_read = filemap_splice_read,
+ .splice_write = iter_file_splice_write,
.fsync = hfs_file_fsync,
.open = hfs_file_open,
.release = hfs_file_release,
--
2.48.1
next prev parent reply other threads:[~2025-05-29 13:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-29 14:00 [PATCH 1/2] hfsplus: " Yangtao Li
2025-05-29 14:00 ` Yangtao Li [this message]
2025-05-29 18:28 ` [PATCH 2/2] hfs: " Viacheslav Dubeyko
2025-06-06 23:04 ` Viacheslav Dubeyko
2025-05-29 18:27 ` [PATCH 1/2] hfsplus: " Viacheslav Dubeyko
2025-06-06 23:04 ` Viacheslav Dubeyko
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=20250529140033.2296791-2-frank.li@vivo.com \
--to=frank.li@vivo.com \
--cc=glaubitz@physik.fu-berlin.de \
--cc=kees@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=slava@dubeyko.com \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®