summaryrefslogtreecommitdiffstats
path: root/fs/iomap
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2024-08-27 12:51:36 +0200
committerChristian Brauner <brauner@kernel.org>2024-09-03 15:01:23 +0200
commit31754ea6cbbc08d5bbe1fa290320c3048d8d98a3 (patch)
treef166080b1654f36d8fca30d7da566008ef102e54 /fs/iomap
parentiomap: remove set_memor_ro() on zero page (diff)
downloadlinux-31754ea6cbbc08d5bbe1fa290320c3048d8d98a3.tar.xz
linux-31754ea6cbbc08d5bbe1fa290320c3048d8d98a3.zip
iomap: add a private argument for iomap_file_buffered_write
In order to switch fuse over to using iomap for buffered writes we need to be able to have the struct file for the original write, in case we have to read in the page to make it uptodate. Handle this by using the existing private field in the iomap_iter, and add the argument to iomap_file_buffered_write. This will allow us to pass the file in through the iomap buffered write path, and is flexible for any other file systems needs. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Link: https://lore.kernel.org/r/7f55c7c32275004ba00cddf862d970e6e633f750.1724755651.git.josef@toxicpanda.com Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/iomap')
-rw-r--r--fs/iomap/buffered-io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index d745f718bcde..e79d11701553 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -1022,13 +1022,14 @@ retry:
ssize_t
iomap_file_buffered_write(struct kiocb *iocb, struct iov_iter *i,
- const struct iomap_ops *ops)
+ const struct iomap_ops *ops, void *private)
{
struct iomap_iter iter = {
.inode = iocb->ki_filp->f_mapping->host,
.pos = iocb->ki_pos,
.len = iov_iter_count(i),
.flags = IOMAP_WRITE,
+ .private = private,
};
ssize_t ret;