projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31a5c6e
)
MM: use DIV_ROUND_UP() in mm/memory.c
author
Rolf Eike Beer
<
[email protected]
>
Mon, 16 Jul 2007 06:38:03 +0000
(23:38 -0700)
committer
Linus Torvalds
<
[email protected]
>
Mon, 16 Jul 2007 16:05:35 +0000
(09:05 -0700)
Replace a hand coded version of DIV_ROUND_UP().
Signed-off-by: Rolf Eike Beer <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/memory.c
patch
|
blob
|
history
diff --git
a/mm/memory.c
b/mm/memory.c
index f64cbf9baa3633fc1755f675ec2b46c920c4ecef..ee2925998e2e2e71ba3db28cb603666a293264bc 100644
(file)
--- a/
mm/memory.c
+++ b/
mm/memory.c
@@
-2673,7
+2673,7
@@
int make_pages_present(unsigned long addr, unsigned long end)
write = (vma->vm_flags & VM_WRITE) != 0;
BUG_ON(addr >= end);
BUG_ON(end > vma->vm_end);
- len =
(end+PAGE_SIZE-1)/PAGE_SIZE-
addr/PAGE_SIZE;
+ 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)