diff options
author | Rolf Eike Beer <eike-kernel@sf-tec.de> | 2007-07-15 23:38:03 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 09:05:35 -0700 |
commit | 68e116a3b57d09b220fe38712bebd956b6dbbbc6 (patch) | |
tree | a60f42f4b34b0a6d9544441c808f0dc4c67312a7 /mm/memory.c | |
parent | 31a5c6e4f25704f51f9a1373f0784034306d4cf1 (diff) | |
download | linux-68e116a3b57d09b220fe38712bebd956b6dbbbc6.tar.gz linux-68e116a3b57d09b220fe38712bebd956b6dbbbc6.tar.bz2 linux-68e116a3b57d09b220fe38712bebd956b6dbbbc6.zip |
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.c | 2 |
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) |