aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
authorRolf Eike Beer <eike-kernel@sf-tec.de>2007-07-16 02:38:03 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-16 12:05:35 -0400
commit68e116a3b57d09b220fe38712bebd956b6dbbbc6 (patch)
treea60f42f4b34b0a6d9544441c808f0dc4c67312a7 /mm/memory.c
parent31a5c6e4f25704f51f9a1373f0784034306d4cf1 (diff)
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/memory.c')
-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)
2673 write = (vma->vm_flags & VM_WRITE) != 0; 2673 write = (vma->vm_flags & VM_WRITE) != 0;
2674 BUG_ON(addr >= end); 2674 BUG_ON(addr >= end);
2675 BUG_ON(end > vma->vm_end); 2675 BUG_ON(end > vma->vm_end);
2676 len = (end+PAGE_SIZE-1)/PAGE_SIZE-addr/PAGE_SIZE; 2676 len = DIV_ROUND_UP(end, PAGE_SIZE) - addr/PAGE_SIZE;
2677 ret = get_user_pages(current, current->mm, addr, 2677 ret = get_user_pages(current, current->mm, addr,
2678 len, write, 0, NULL, NULL); 2678 len, write, 0, NULL, NULL);
2679 if (ret < 0) 2679 if (ret < 0)