Skip to content
Snippets Groups Projects
Commit b0d61c7e authored by Alexander Kuleshov's avatar Alexander Kuleshov Committed by Linus Torvalds
Browse files

mm/msync: use offset_in_page macro


linux/mm.h provides offset_in_page() macro.  Let's use already predefined
macro instead of (addr & ~PAGE_MASK).

Signed-off-by: default avatarAlexander Kuleshov <kuleshovmail@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c118baf8
No related branches found
No related tags found
No related merge requests found
...@@ -38,7 +38,7 @@ SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags) ...@@ -38,7 +38,7 @@ SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags)
if (flags & ~(MS_ASYNC | MS_INVALIDATE | MS_SYNC)) if (flags & ~(MS_ASYNC | MS_INVALIDATE | MS_SYNC))
goto out; goto out;
if (start & ~PAGE_MASK) if (offset_in_page(start))
goto out; goto out;
if ((flags & MS_ASYNC) && (flags & MS_SYNC)) if ((flags & MS_ASYNC) && (flags & MS_SYNC))
goto out; goto out;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment