Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144631
b: refs/heads/master
c: a425a63
h: refs/heads/master
i:
  144629: efdbb9a
  144627: 952dc20
  144623: 27eded8
v: v3
  • Loading branch information
Mel Gorman authored and Linus Torvalds committed May 5, 2009
1 parent 4479a00 commit f5b2bca
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 99ee12973e5fd1123ed1779fb4d11ac7d381d430
refs/heads/master: a425a638c858fd10370b573bde81df3ba500e271
8 changes: 8 additions & 0 deletions trunk/mm/madvise.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,14 @@ static long madvise_willneed(struct vm_area_struct * vma,
if (!file)
return -EBADF;

/*
* Page cache readahead assumes page cache pages are order-0 which
* is not the case for hugetlbfs. Do not give a bad return value
* but ignore the advice.
*/
if (vma->vm_flags & VM_HUGETLB)
return 0;

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

0 comments on commit f5b2bca

Please sign in to comment.