Commit 12e3004e464f554e0d57ddd0b4185060275e1f12

Authored by Al Viro
1 parent c61c70384f

untangling process_vm_..., part 3

lift iov one more level out - from process_vm_rw_single_vec to
process_vm_rw_core().  Same story as with the previous commit.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Showing 1 changed file with 3 additions and 4 deletions Side-by-side Diff

mm/process_vm_access.c
... ... @@ -174,7 +174,7 @@
174 174 */
175 175 static int process_vm_rw_single_vec(unsigned long addr,
176 176 unsigned long len,
177   - const struct iovec *lvec,
  177 + const struct iovec **iovp,
178 178 unsigned long lvec_cnt,
179 179 unsigned long *lvec_current,
180 180 size_t *lvec_offset,
... ... @@ -193,7 +193,6 @@
193 193 unsigned long nr_pages_to_copy;
194 194 unsigned long max_pages_per_loop = PVM_MAX_KMALLOC_PAGES
195 195 / sizeof(struct pages *);
196   - const struct iovec *iov = lvec + *lvec_current;
197 196  
198 197 *bytes_copied = 0;
199 198  
... ... @@ -208,7 +207,7 @@
208 207  
209 208 rc = process_vm_rw_pages(task, mm, process_pages, pa,
210 209 start_offset, len,
211   - &iov, lvec_cnt,
  210 + iovp, lvec_cnt,
212 211 lvec_current, lvec_offset,
213 212 vm_write, nr_pages_to_copy,
214 213 &bytes_copied_loop);
... ... @@ -319,7 +318,7 @@
319 318 for (i = 0; i < riovcnt && iov_l_curr_idx < liovcnt; i++) {
320 319 rc = process_vm_rw_single_vec(
321 320 (unsigned long)rvec[i].iov_base, rvec[i].iov_len,
322   - lvec, liovcnt, &iov_l_curr_idx, &iov_l_curr_offset,
  321 + &lvec, liovcnt, &iov_l_curr_idx, &iov_l_curr_offset,
323 322 process_pages, mm, task, vm_write, &bytes_copied_loop);
324 323 bytes_copied += bytes_copied_loop;
325 324 if (rc != 0) {