Commit 4c04146f authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] fadvise length handling fix

POSIX sez: "If len is zero, all data following offset is specified."
parent e408f065
...@@ -38,6 +38,9 @@ asmlinkage long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice) ...@@ -38,6 +38,9 @@ asmlinkage long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice)
goto out; goto out;
} }
if (len == 0) /* 0 == "all data following offset" */
len = -1;
bdi = mapping->backing_dev_info; bdi = mapping->backing_dev_info;
switch (advice) { switch (advice) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment