aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-04-29 17:42:49 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-04-29 17:42:49 -0700
commit4c04146f42cae0d0dc1a4150b7c2915608c74008 (patch)
tree69fc11ff3cdd42b8a5bc397bdf3eeeaf0b02dfd0 /mm
parente408f0655a224c6899ccff2436f2b25af117b5d8 (diff)
downloadhistory-4c04146f42cae0d0dc1a4150b7c2915608c74008.tar.gz
[PATCH] fadvise length handling fix
POSIX sez: "If len is zero, all data following offset is specified."
Diffstat (limited to 'mm')
-rw-r--r--mm/fadvise.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/fadvise.c b/mm/fadvise.c
index 63f71a712b4633..0f0b750f82d79e 100644
--- a/mm/fadvise.c
+++ b/mm/fadvise.c
@@ -38,6 +38,9 @@ asmlinkage long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice)
goto out;
}
+ if (len == 0) /* 0 == "all data following offset" */
+ len = -1;
+
bdi = mapping->backing_dev_info;
switch (advice) {