Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36165
b: refs/heads/master
c: 910e46d
h: refs/heads/master
i:
  36163: bdbe7fd
v: v3
  • Loading branch information
Sonic Zhang authored and Linus Torvalds committed Sep 27, 2006
1 parent dcd9800 commit 7474ddc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0159b141d8b1f9b9f9cffacae47bec1e05c63b8b
refs/heads/master: 910e46da4b4e93d56ffea318c64afa41868d5e6d
8 changes: 6 additions & 2 deletions trunk/mm/nommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,20 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
struct page **pages, struct vm_area_struct **vmas)
{
int i;
static struct vm_area_struct dummy_vma;
struct vm_area_struct *vma;

for (i = 0; i < len; i++) {
vma = find_vma(mm, start);
if(!vma)
return i ? : -EFAULT;

if (pages) {
pages[i] = virt_to_page(start);
if (pages[i])
page_cache_get(pages[i]);
}
if (vmas)
vmas[i] = &dummy_vma;
vmas[i] = vma;
start += PAGE_SIZE;
}
return(i);
Expand Down

0 comments on commit 7474ddc

Please sign in to comment.