From: Christoph Hellwig <hch@lst.de>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 11/12] fuse: drop redundant arguments to fuse_perform_write
Date: Thu, 1 Jun 2023 16:59:03 +0200 [thread overview]
Message-ID: <20230601145904.1385409-12-hch@lst.de> (raw)
In-Reply-To: <20230601145904.1385409-1-hch@lst.de>
pos is always equal to iocb->ki_pos, and mapping is always equal to
iocb->ki_filp->f_mapping.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Acked-by: Miklos Szeredi <mszeredi@redhat.com>
---
fs/fuse/file.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index d5902506cdcc65..b4e272a65fdd25 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1280,13 +1280,13 @@ static inline unsigned int fuse_wr_pages(loff_t pos, size_t len,
max_pages);
}
-static ssize_t fuse_perform_write(struct kiocb *iocb,
- struct address_space *mapping,
- struct iov_iter *ii, loff_t pos)
+static ssize_t fuse_perform_write(struct kiocb *iocb, struct iov_iter *ii)
{
+ struct address_space *mapping = iocb->ki_filp->f_mapping;
struct inode *inode = mapping->host;
struct fuse_conn *fc = get_fuse_conn(inode);
struct fuse_inode *fi = get_fuse_inode(inode);
+ loff_t pos = iocb->ki_pos;
int err = 0;
ssize_t res = 0;
@@ -1383,8 +1383,7 @@ static ssize_t fuse_cache_write_iter(struct kiocb *iocb, struct iov_iter *from)
if (written < 0 || !iov_iter_count(from))
goto out;
- written_buffered = fuse_perform_write(iocb, mapping, from,
- iocb->ki_pos);
+ written_buffered = fuse_perform_write(iocb, from);
if (written_buffered < 0) {
err = written_buffered;
goto out;
@@ -1403,7 +1402,7 @@ static ssize_t fuse_cache_write_iter(struct kiocb *iocb, struct iov_iter *from)
written += written_buffered;
} else {
- written = fuse_perform_write(iocb, mapping, from, iocb->ki_pos);
+ written = fuse_perform_write(iocb, from);
}
out:
inode_unlock(inode);
--
2.39.2
next prev parent reply other threads:[~2023-06-01 14:59 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-01 14:58 [Cluster-devel] cleanup the filemap / direct I/O interaction v4 Christoph Hellwig
2023-06-01 14:58 ` [Cluster-devel] [PATCH 01/12] backing_dev: remove current->backing_dev_info Christoph Hellwig
2023-07-06 0:18 ` [Cluster-devel] [f2fs-dev] " patchwork-bot+f2fs
2023-06-01 14:58 ` [Cluster-devel] [PATCH 02/12] iomap: update ki_pos a little later in iomap_dio_complete Christoph Hellwig
2023-06-01 14:58 ` [Cluster-devel] [PATCH 03/12] filemap: update ki_pos in generic_perform_write Christoph Hellwig
2023-08-27 19:41 ` Al Viro
2023-08-27 21:45 ` Al Viro
2023-08-28 12:32 ` Christoph Hellwig
2023-08-28 13:56 ` Al Viro
2023-08-28 14:15 ` Christoph Hellwig
2023-09-13 11:00 ` Christoph Hellwig
2023-09-13 16:33 ` Christian Brauner
2023-08-28 1:04 ` Al Viro
2023-08-28 12:30 ` Christoph Hellwig
2023-08-28 14:02 ` Al Viro
2023-06-01 14:58 ` [Cluster-devel] [PATCH 04/12] filemap: add a kiocb_write_and_wait helper Christoph Hellwig
2023-06-01 14:58 ` [Cluster-devel] [PATCH 05/12] filemap: add a kiocb_invalidate_pages helper Christoph Hellwig
2023-06-01 14:58 ` [Cluster-devel] [PATCH 06/12] filemap: add a kiocb_invalidate_post_direct_write helper Christoph Hellwig
2023-06-01 14:58 ` [Cluster-devel] [PATCH 07/12] iomap: update ki_pos in iomap_file_buffered_write Christoph Hellwig
2023-06-01 14:59 ` [Cluster-devel] [PATCH 08/12] iomap: use kiocb_write_and_wait and kiocb_invalidate_pages Christoph Hellwig
2023-06-01 14:59 ` [Cluster-devel] [PATCH 09/12] fs: factor out a direct_write_fallback helper Christoph Hellwig
2023-06-06 0:04 ` Darrick J. Wong
2023-06-06 6:43 ` Christoph Hellwig
2023-06-01 14:59 ` [Cluster-devel] [PATCH 10/12] fuse: update ki_pos in fuse_perform_write Christoph Hellwig
2023-06-01 14:59 ` Christoph Hellwig [this message]
2023-06-01 14:59 ` [Cluster-devel] [PATCH 12/12] fuse: use direct_write_fallback Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2023-05-31 7:50 [Cluster-devel] cleanup the filemap / direct I/O interaction v3 (full series now) Christoph Hellwig
2023-05-31 7:50 ` [Cluster-devel] [PATCH 11/12] fuse: drop redundant arguments to fuse_perform_write Christoph Hellwig
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=20230601145904.1385409-12-hch@lst.de \
--to=hch@lst.de \
/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 NNTP newsgroup(s).