summarylogtreecommitdiffstats
path: root/kernel-5.14-backport.patch
blob: 81b033e00244df9b5683bc14ac745e512fe28d01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- a/file.c
+++ b/file.c
@@ -1029,10 +1029,10 @@
 			size_t cp, tail = PAGE_SIZE - off;
 
 			page = pages[ip];
-			cp = copy_page_from_iter_atomic(page, off,
-							min(tail, bytes), from);
+			cp = iov_iter_copy_from_user_atomic(page, from, off,
+							    min(tail, bytes));
 			flush_dcache_page(page);
-
+			iov_iter_advance(from, cp);
 			copied += cp;
 			bytes -= cp;
 			if (!bytes || !cp)