lkml.org 
[lkml]   [2023]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: [PATCH v10 2/8] iov_iter: Add a function to extract a page list from an iterator
Date
iov_iter_extract_kvec_pages() isn't quite right.  The problem is that there's
not currently any path by which it can be tested, as currently
iov_iter_get_pages*() balk at it, but I managed to do that by piggybacking
some testing code on my cifs patches.

The attached change fixes the problem.

David

--- a/lib/iov_iter.c
+++ b/lib/iov_iter.c
@@ -2080,9 +2080,9 @@ static ssize_t iov_iter_extract_kvec_pages(struct iov_iter *i,
skip = 0;
}

- offset = skip % PAGE_SIZE;
+ kaddr = i->kvec->iov_base + skip;
+ offset = (unsigned long)kaddr & ~PAGE_MASK;
*offset0 = offset;
- kaddr = i->kvec->iov_base;

maxpages = want_pages_array(pages, maxsize, offset, maxpages);
if (!maxpages)
\
 
 \ /
  Last update: 2023-03-26 23:56    [W:0.194 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site