Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 83099
b: refs/heads/master
c: b5beb1c
h: refs/heads/master
i:
  83097: 2166e09
  83095: b64a211
v: v3
  • Loading branch information
Masatake YAMATO authored and Linus Torvalds committed Feb 5, 2008
1 parent 23679cc commit babe53b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e6f3602d2c58815775b2a293cec6650622236169
refs/heads/master: b5beb1caff4ce063e6e2dc13f23b80eeef4e9782
16 changes: 14 additions & 2 deletions trunk/mm/fadvise.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,21 @@ 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 */
if (mapping->a_ops->get_xip_page) {
switch (advice) {
case POSIX_FADV_NORMAL:
case POSIX_FADV_RANDOM:
case POSIX_FADV_SEQUENTIAL:
case POSIX_FADV_WILLNEED:
case POSIX_FADV_NOREUSE:
case POSIX_FADV_DONTNEED:
/* no bad return value, but ignore advice */
break;
default:
ret = -EINVAL;
}
goto out;
}

/* Careful about overflows. Len == 0 means "as much as possible" */
endbyte = offset + len;
Expand Down

0 comments on commit babe53b

Please sign in to comment.