mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-08 14:23:19 +00:00
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>
This commit is contained in:
parent
31a5c6e4f2
commit
68e116a3b5
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user