diff options
author | Andrew Morton <akpm@osdl.org> | 2004-04-29 17:42:49 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-04-29 17:42:49 -0700 |
commit | 4c04146f42cae0d0dc1a4150b7c2915608c74008 (patch) | |
tree | 69fc11ff3cdd42b8a5bc397bdf3eeeaf0b02dfd0 /mm | |
parent | e408f0655a224c6899ccff2436f2b25af117b5d8 (diff) | |
download | history-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.c | 3 |
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) { |