From: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
To: Christoph Hellwig <hch@lst.de>, djwong@kernel.org
Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/2] iomap: micro optimize the ki_pos assignment in iomap_file_buffered_write
Date: Mon, 17 Jul 2023 10:44:34 +0530 [thread overview]
Message-ID: <87r0p7nmpx.fsf@doe.com> (raw)
In-Reply-To: <20230714085124.548920-2-hch@lst.de>
Christoph Hellwig <hch@lst.de> writes:
> We have the new value for ki_pos right at hand in iter.pos, so assign
> that instead of recalculating it from ret.
>
Looks good to me. Feel free to add -
Reviewed-by: Ritesh Harjani (IBM) <ritesh.harjani@gmail.com>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> fs/iomap/buffered-io.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
> index 7cc9f7274883a5..aa8967cca1a31b 100644
> --- a/fs/iomap/buffered-io.c
> +++ b/fs/iomap/buffered-io.c
> @@ -875,7 +875,7 @@ iomap_file_buffered_write(struct kiocb *iocb, struct iov_iter *i,
> if (unlikely(iter.pos == iocb->ki_pos))
> return ret;
> ret = iter.pos - iocb->ki_pos;
> - iocb->ki_pos += ret;
> + iocb->ki_pos = iter.pos;
> return ret;
> }
> EXPORT_SYMBOL_GPL(iomap_file_buffered_write);
> --
> 2.39.2
next prev parent reply other threads:[~2023-07-17 5:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-14 8:51 [PATCH 1/2] iomap: fix a regression for partial write errors Christoph Hellwig
2023-07-14 8:51 ` [PATCH 2/2] iomap: micro optimize the ki_pos assignment in iomap_file_buffered_write Christoph Hellwig
2023-07-14 14:52 ` Darrick J. Wong
2023-07-17 5:14 ` Ritesh Harjani [this message]
2023-07-14 14:51 ` [PATCH 1/2] iomap: fix a regression for partial write errors Darrick J. Wong
2023-07-17 5:12 ` Ritesh Harjani
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=87r0p7nmpx.fsf@doe.com \
--to=ritesh.list@gmail.com \
--cc=djwong@kernel.org \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.