Commit b0d61c7e56815b0b881c81f6779a65f4fdae4bc0

Authored by Alexander Kuleshov
Committed by Linus Torvalds
1 parent c118baf802

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: Alexander Kuleshov <kuleshovmail@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -38,7 +38,7 @@
38 38  
39 39 if (flags & ~(MS_ASYNC | MS_INVALIDATE | MS_SYNC))
40 40 goto out;
41   - if (start & ~PAGE_MASK)
  41 + if (offset_in_page(start))
42 42 goto out;
43 43 if ((flags & MS_ASYNC) && (flags & MS_SYNC))
44 44 goto out;