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>
This commit is contained in:
		
							parent
							
								
									c118baf802
								
							
						
					
					
						commit
						b0d61c7e56
					
				| @ -38,7 +38,7 @@ SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags) | ||||
| 
 | ||||
| 	if (flags & ~(MS_ASYNC | MS_INVALIDATE | MS_SYNC)) | ||||
| 		goto out; | ||||
| 	if (start & ~PAGE_MASK) | ||||
| 	if (offset_in_page(start)) | ||||
| 		goto out; | ||||
| 	if ((flags & MS_ASYNC) && (flags & MS_SYNC)) | ||||
| 		goto out; | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user