diff options
-rw-r--r-- | mm/fadvise.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/fadvise.c b/mm/fadvise.c index 8d723c9e8b75..469491e0af79 100644 --- a/mm/fadvise.c +++ b/mm/fadvise.c | |||
@@ -117,7 +117,8 @@ SYSCALL_DEFINE(fadvise64_64)(int fd, loff_t offset, loff_t len, int advice) | |||
117 | break; | 117 | break; |
118 | case POSIX_FADV_DONTNEED: | 118 | case POSIX_FADV_DONTNEED: |
119 | if (!bdi_write_congested(mapping->backing_dev_info)) | 119 | if (!bdi_write_congested(mapping->backing_dev_info)) |
120 | filemap_flush(mapping); | 120 | __filemap_fdatawrite_range(mapping, offset, endbyte, |
121 | WB_SYNC_NONE); | ||
121 | 122 | ||
122 | /* First and last FULL page! */ | 123 | /* First and last FULL page! */ |
123 | start_index = (offset+(PAGE_CACHE_SIZE-1)) >> PAGE_CACHE_SHIFT; | 124 | start_index = (offset+(PAGE_CACHE_SIZE-1)) >> PAGE_CACHE_SHIFT; |