Thread (8 messages) 8 messages, 4 authors, 2023-08-15

Re: [RFC PATCH] iov_iter: Convert iterate*() to inline funcs

From: Matthew Wilcox <willy@infradead.org>
Date: 2023-08-14 13:24:23
Also in: linux-fsdevel, linux-mm, lkml

On Fri, Aug 11, 2023 at 03:32:09PM +0100, David Howells wrote:
quoted hunk ↗ jump to hunk
@@ -578,10 +683,11 @@ size_t copy_page_from_iter_atomic(struct page *page, unsigned offset, size_t byt
 		kunmap_atomic(kaddr);
 		return 0;
 	}
-	iterate_and_advance(i, bytes, base, len, off,
-		copyin(p + off, base, len),
-		memcpy_from_iter(i, p + off, base, len)
-	)
+
+	bytes = iterate_and_advance(i, bytes, p,
+				    copy_from_user_iter,
+				    iov_iter_is_copy_mc(i) ?
+				    memcpy_from_iter_mc : memcpy_from_iter);
 	kunmap_atomic(kaddr);
 	return bytes;
 }
Please work against linux-next; this function is completely rewritten
there.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help