diff options
author | Christian Brauner <brauner@kernel.org> | 2025-08-20 11:13:06 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-08-20 11:13:06 +0200 |
commit | b1b5b825892bc309810fe57af708503a90a49fa6 (patch) | |
tree | 16051bba1c512df574b0f52b9c8a538b1d365faa /io_uring/rw.c | |
parent | b19a97d57c15643494ac8bfaaa35e3ee472d41da (diff) | |
parent | 2729a60bbfb9215997f25372ebe9b7964f038296 (diff) |
Merge patch series "io_uring / dio metadata fixes"
Christoph Hellwig <hch@lst.de> says:
Hi all,
while trying to add XFS support for passing through metadata I ran
into a few issues with how that support is wire up for the current
block device use cases, and this fixes it.
* patches from https://lore.kernel.org/20250819082517.2038819-1-hch@lst.de:
block: don't silently ignore metadata for sync read/write
fs: add a FMODE_ flag to indicate IOCB_HAS_METADATA availability
Link: https://lore.kernel.org/20250819082517.2038819-1-hch@lst.de
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'io_uring/rw.c')
-rw-r--r-- | io_uring/rw.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/io_uring/rw.c b/io_uring/rw.c index 52a5b950b2e5..af5a54b5db12 100644 --- a/io_uring/rw.c +++ b/io_uring/rw.c @@ -886,6 +886,9 @@ static int io_rw_init_file(struct io_kiocb *req, fmode_t mode, int rw_type) if (req->flags & REQ_F_HAS_METADATA) { struct io_async_rw *io = req->async_data; + if (!(file->f_mode & FMODE_HAS_METADATA)) + return -EINVAL; + /* * We have a union of meta fields with wpq used for buffered-io * in io_async_rw, so fail it here. |