Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 115860
b: refs/heads/master
c: c11d69d
h: refs/heads/master
v: v3
  • Loading branch information
Lee Schermerhorn authored and Linus Torvalds committed Oct 20, 2008
1 parent fecc202 commit d932225
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 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: e0f79b8f1f3394bb344b7b83d6f121ac2af327de
refs/heads/master: c11d69d8c830e09a0e7b3935c952afb26c48bba8
14 changes: 2 additions & 12 deletions trunk/mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -2819,19 +2819,9 @@ int make_pages_present(unsigned long addr, unsigned long end)
len = DIV_ROUND_UP(end, PAGE_SIZE) - addr/PAGE_SIZE;
ret = get_user_pages(current, current->mm, addr,
len, write, 0, NULL, NULL);
if (ret < 0) {
/*
SUS require strange return value to mlock
- invalid addr generate to ENOMEM.
- out of memory should generate EAGAIN.
*/
if (ret == -EFAULT)
ret = -ENOMEM;
else if (ret == -ENOMEM)
ret = -EAGAIN;
if (ret < 0)
return ret;
}
return ret == len ? 0 : -ENOMEM;
return ret == len ? 0 : -1;
}

#if !defined(__HAVE_ARCH_GATE_AREA)
Expand Down

0 comments on commit d932225

Please sign in to comment.