]> git.ipfire.org Git - thirdparty/linux.git/commit
netfs: Advance iterator correctly rather than jumping it
authorDavid Howells <dhowells@redhat.com>
Fri, 27 Sep 2024 08:08:42 +0000 (09:08 +0100)
committerChristian Brauner <brauner@kernel.org>
Fri, 27 Sep 2024 16:29:20 +0000 (18:29 +0200)
commit9fffa4e9b3b158f63334e603e610da7d529a0f9a
tree0778bf4f5c0d5696e5f68f6c3aae07350105af72
parentff98751bae40faed1ba9c6a7287e84430f7dec64
netfs: Advance iterator correctly rather than jumping it

In netfs_write_folio(), use iov_iter_advance() to advance the folio as we
split bits of it off to subrequests rather than manually jumping the
->iov_offset value around.  This becomes more problematic when we use a
bounce buffer made out of single-page folios to cover a multipage pagecache
folio.

Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/r/2238548.1727424522@warthog.procyon.org.uk
cc: Jeff Layton <jlayton@kernel.org>
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/netfs/write_issue.c