summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-02-05 10:22:50 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2014-04-01 23:19:25 -0400
commitc61c70384fad407bfcb066c3fb9271164d630212 (patch)
tree662d34e8b1f7dc18f4d702a30f45aad29a52fda2 /mm
parent480402e18def5514c9dc8cb04e3c0e7482ff2b86 (diff)
untangling process_vm_..., part 2
move iov to caller's stack frame; the value we assign to it on the next call of process_vm_rw_pages() is equal to the value it had when the last time we were leaving process_vm_rw_pages(). drop lvec argument of process_vm_rw_pages() - it's not used anymore. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'mm')
-rw-r--r--mm/process_vm_access.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mm/process_vm_access.c b/mm/process_vm_access.c
index 7b8d63e6c30b..186ec5db6090 100644
--- a/mm/process_vm_access.c
+++ b/mm/process_vm_access.c
@@ -45,7 +45,7 @@ static int process_vm_rw_pages(struct task_struct *task,
45 unsigned long pa, 45 unsigned long pa,
46 unsigned long start_offset, 46 unsigned long start_offset,
47 unsigned long len, 47 unsigned long len,
48 const struct iovec *lvec, 48 const struct iovec **iovp,
49 unsigned long lvec_cnt, 49 unsigned long lvec_cnt,
50 unsigned long *lvec_current, 50 unsigned long *lvec_current,
51 size_t *lvec_offset, 51 size_t *lvec_offset,
@@ -60,7 +60,7 @@ static int process_vm_rw_pages(struct task_struct *task,
60 int ret; 60 int ret;
61 ssize_t bytes_to_copy; 61 ssize_t bytes_to_copy;
62 ssize_t rc = 0; 62 ssize_t rc = 0;
63 const struct iovec *iov = lvec + *lvec_current; 63 const struct iovec *iov = *iovp;
64 64
65 *bytes_copied = 0; 65 *bytes_copied = 0;
66 66
@@ -149,6 +149,7 @@ end:
149 put_page(process_pages[j]); 149 put_page(process_pages[j]);
150 } 150 }
151 151
152 *iovp = iov;
152 return rc; 153 return rc;
153} 154}
154 155
@@ -192,6 +193,7 @@ static int process_vm_rw_single_vec(unsigned long addr,
192 unsigned long nr_pages_to_copy; 193 unsigned long nr_pages_to_copy;
193 unsigned long max_pages_per_loop = PVM_MAX_KMALLOC_PAGES 194 unsigned long max_pages_per_loop = PVM_MAX_KMALLOC_PAGES
194 / sizeof(struct pages *); 195 / sizeof(struct pages *);
196 const struct iovec *iov = lvec + *lvec_current;
195 197
196 *bytes_copied = 0; 198 *bytes_copied = 0;
197 199
@@ -206,7 +208,7 @@ static int process_vm_rw_single_vec(unsigned long addr,
206 208
207 rc = process_vm_rw_pages(task, mm, process_pages, pa, 209 rc = process_vm_rw_pages(task, mm, process_pages, pa,
208 start_offset, len, 210 start_offset, len,
209 lvec, lvec_cnt, 211 &iov, lvec_cnt,
210 lvec_current, lvec_offset, 212 lvec_current, lvec_offset,
211 vm_write, nr_pages_to_copy, 213 vm_write, nr_pages_to_copy,
212 &bytes_copied_loop); 214 &bytes_copied_loop);