summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorRolf Eike Beer <eike-kernel@sf-tec.de>2007-07-16 10:38:03 +0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-16 20:05:35 +0400
commit68e116a3b57d09b220fe38712bebd956b6dbbbc6 (patch)
treea60f42f4b34b0a6d9544441c808f0dc4c67312a7 /mm
parent31a5c6e4f25704f51f9a1373f0784034306d4cf1 (diff)
downloadlinux-68e116a3b57d09b220fe38712bebd956b6dbbbc6.tar.xz
MM: use DIV_ROUND_UP() in mm/memory.c
Replace a hand coded version of DIV_ROUND_UP(). Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/memory.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory.c b/mm/memory.c
index f64cbf9baa36..ee2925998e2e 100644
--- 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)