mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[PATCH] xip: madvice/fadvice: execute in place
Make sys_madvice/fadvice return sane with xip. Signed-off-by: Carsten Otte <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
eb6fe0c388
commit
fe77ba6f4f
2 changed files with 9 additions and 0 deletions
|
|
@ -43,6 +43,10 @@ asmlinkage long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice)
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (mapping->a_ops->get_xip_page)
|
||||
/* no bad return value, but ignore advice */
|
||||
goto out;
|
||||
|
||||
/* Careful about overflows. Len == 0 means "as much as possible" */
|
||||
endbyte = offset + len;
|
||||
if (!len || endbyte < len)
|
||||
|
|
|
|||
Loading…
Reference in a new issue