Don't forget to adjust the source offset in io_copy_page(), otherwise it'll be copying into the same location in some cases for highmem setups.
Unified · Split
| @@ -1079,6 +1079,7 @@ static ssize_t io_copy_page(struct io_copy_cache *cc, struct page *src_page, · 1078 unmodified lines | |||
| 1079 | 1079 | ||
| 1080 | cc->size -= n; | 1080 | cc->size -= n; |
| 1081 | cc->offset += n; | 1081 | cc->offset += n; |
| 1082 | src_offset += n; | ||
| 1082 | len -= n; | 1083 | len -= n; |
| 1083 | copied += n; | 1084 | copied += n; |
| 1084 | } | 1085 | } |