summarylogtreecommitdiffstats
path: root/kernel-5.14-backport.patch
blob: f9b5dc636d0c41ef4909d0227447364828137887 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- a/file.c
+++ b/file.c
@@ -1025,10 +1025,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)