[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a6adab95d955065dd05c78ac462c32dfd146e820.camel@kernel.org>
Date: Fri, 31 Mar 2023 15:05:55 -0400
From: Jeff Layton <jlayton@...nel.org>
To: David Howells <dhowells@...hat.com>,
Matthew Wilcox <willy@...radead.org>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Cc: Al Viro <viro@...iv.linux.org.uk>,
Christoph Hellwig <hch@...radead.org>,
Jens Axboe <axboe@...nel.dk>,
Christian Brauner <brauner@...nel.org>,
Chuck Lever III <chuck.lever@...cle.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
netdev@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Steve French <sfrench@...ba.org>,
Shyam Prasad N <nspmangalore@...il.com>,
Rohith Surabattula <rohiths.msft@...il.com>,
linux-cachefs@...hat.com, linux-cifs@...r.kernel.org
Subject: Re: [PATCH v3 01/55] netfs: Fix netfs_extract_iter_to_sg() for
ITER_UBUF/IOVEC
On Fri, 2023-03-31 at 17:08 +0100, David Howells wrote:
> Fix netfs_extract_iter_to_sg() for ITER_UBUF and ITER_IOVEC to set the size
> of the page to the part of the page extracted, not the remaining amount of
> data in the extracted page array at that point.
>
> This doesn't yet affect anything as cifs, the only current user, only
> passes in non-user-backed iterators.
>
> Fixes: 018584697533 ("netfs: Add a function to extract an iterator into a scatterlist")
> Signed-off-by: David Howells <dhowells@...hat.com>
> cc: Jeff Layton <jlayton@...nel.org>
> cc: Steve French <sfrench@...ba.org>
> cc: Shyam Prasad N <nspmangalore@...il.com>
> cc: Rohith Surabattula <rohiths.msft@...il.com>
> cc: linux-cachefs@...hat.com
> cc: linux-cifs@...r.kernel.org
> cc: linux-fsdevel@...r.kernel.org
> ---
> fs/netfs/iterator.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/netfs/iterator.c b/fs/netfs/iterator.c
> index e9a45dea748a..8a4c86687429 100644
> --- a/fs/netfs/iterator.c
> +++ b/fs/netfs/iterator.c
> @@ -139,7 +139,7 @@ static ssize_t netfs_extract_user_to_sg(struct iov_iter *iter,
> size_t seg = min_t(size_t, PAGE_SIZE - off, len);
>
> *pages++ = NULL;
> - sg_set_page(sg, page, len, off);
> + sg_set_page(sg, page, seg, off);
> sgtable->nents++;
> sg++;
> len -= seg;
>
Reviewed-by: Jeff Layton <jlayton@...nel.org>
Powered by blists - more mailing lists