Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3153
b: refs/heads/master
c: fe77ba6
h: refs/heads/master
i:
  3151: c74d998
v: v3
  • Loading branch information
Carsten Otte authored and Linus Torvalds committed Jun 24, 2005
1 parent 1d545e5 commit 7e72040
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eb6fe0c388e43b02e261f0fdee60e42f6298d7f7
refs/heads/master: fe77ba6f4f97690baa4c756611a07f3cc033f6ae
4 changes: 4 additions & 0 deletions trunk/mm/fadvise.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions trunk/mm/madvise.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ static long madvise_willneed(struct vm_area_struct * vma,
if (!file)
return -EBADF;

if (file->f_mapping->a_ops->get_xip_page) {
/* no bad return value, but ignore advice */
return 0;
}

*prev = vma;
start = ((start - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
if (end > vma->vm_end)
Expand Down

0 comments on commit 7e72040

Please sign in to comment.