* [PATCH] netfs: Fix netfs_extract_iter_to_sg() for ITER_UBUF/IOVEC
@ 2023-04-12 12:18 David Howells
2023-04-12 16:27 ` Linus Torvalds
0 siblings, 1 reply; 2+ messages in thread
From: David Howells @ 2023-04-12 12:18 UTC (permalink / raw)
To: torvalds
Cc: dhowells, Jeff Layton, Steve French, Shyam Prasad N,
Rohith Surabattula, linux-cachefs, linux-cifs, linux-fsdevel,
linux-kernel
Hi Linus,
Could you apply this, please? It doesn't affect anything yet, but I have
patches in the works that will use it.
Thanks,
David
---
netfs: Fix netfs_extract_iter_to_sg() for ITER_UBUF/IOVEC
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@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
cc: Steve French <sfrench@samba.org>
cc: Shyam Prasad N <nspmangalore@gmail.com>
cc: Rohith Surabattula <rohiths.msft@gmail.com>
cc: linux-cachefs@redhat.com
cc: linux-cifs@vger.kernel.org
cc: linux-fsdevel@vger.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;
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] netfs: Fix netfs_extract_iter_to_sg() for ITER_UBUF/IOVEC
2023-04-12 12:18 [PATCH] netfs: Fix netfs_extract_iter_to_sg() for ITER_UBUF/IOVEC David Howells
@ 2023-04-12 16:27 ` Linus Torvalds
0 siblings, 0 replies; 2+ messages in thread
From: Linus Torvalds @ 2023-04-12 16:27 UTC (permalink / raw)
To: David Howells
Cc: Jeff Layton, Steve French, Shyam Prasad N, Rohith Surabattula,
linux-cachefs, linux-cifs, linux-fsdevel, linux-kernel
On Wed, Apr 12, 2023 at 5:19 AM David Howells <dhowells@redhat.com> wrote:
>
> Could you apply this, please? It doesn't affect anything yet, but I have
> patches in the works that will use it.
Applied,
Linus
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-12 16:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-12 12:18 [PATCH] netfs: Fix netfs_extract_iter_to_sg() for ITER_UBUF/IOVEC David Howells
2023-04-12 16:27 ` Linus Torvalds
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®