Replace a hand coded version of DIV_ROUND_UP().
Signed-off-by: Rolf Eike Beer <[email protected]
---
commit ab35916f807eb4f2019a208e96cb0bddbb91dfc3
tree 6dc4485902c1a96a09ed287270de108630b26719
parent 335aa0289219ca2c1dc309d6bf856d4b25ad8746
author Rolf Eike Beer <[email protected]> Thu, 17 May 2007 23:03:06 +0200
committer Rolf Eike Beer <[email protected]> Thu, 17 May 2007 23:03:06 +0200
mm/memory.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mm/memory.c b/mm/memory.c
index cb94488..5bc26b7 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2674,7 +2674,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)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]