aboutsummaryrefslogtreecommitdiffstats
path: root/mm/fadvise.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/fadvise.c')
-rw-r--r--mm/fadvise.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/fadvise.c b/mm/fadvise.c
index b8a5bc66b0c0..b8024fa7101d 100644
--- a/mm/fadvise.c
+++ b/mm/fadvise.c
@@ -97,8 +97,8 @@ SYSCALL_DEFINE4(fadvise64_64, int, fd, loff_t, offset, loff_t, len, int, advice)
97 break; 97 break;
98 case POSIX_FADV_WILLNEED: 98 case POSIX_FADV_WILLNEED:
99 /* First and last PARTIAL page! */ 99 /* First and last PARTIAL page! */
100 start_index = offset >> PAGE_CACHE_SHIFT; 100 start_index = offset >> PAGE_SHIFT;
101 end_index = endbyte >> PAGE_CACHE_SHIFT; 101 end_index = endbyte >> PAGE_SHIFT;
102 102
103 /* Careful about overflow on the "+1" */ 103 /* Careful about overflow on the "+1" */
104 nrpages = end_index - start_index + 1; 104 nrpages = end_index - start_index + 1;
@@ -124,8 +124,8 @@ SYSCALL_DEFINE4(fadvise64_64, int, fd, loff_t, offset, loff_t, len, int, advice)
124 * preserved on the expectation that it is better to preserve 124 * preserved on the expectation that it is better to preserve
125 * needed memory than to discard unneeded memory. 125 * needed memory than to discard unneeded memory.
126 */ 126 */
127 start_index = (offset+(PAGE_CACHE_SIZE-1)) >> PAGE_CACHE_SHIFT; 127 start_index = (offset+(PAGE_SIZE-1)) >> PAGE_SHIFT;
128 end_index = (endbyte >> PAGE_CACHE_SHIFT); 128 end_index = (endbyte >> PAGE_SHIFT);
129 129
130 if (end_index >= start_index) { 130 if (end_index >= start_index) {
131 unsigned long count = invalidate_mapping_pages(mapping, 131 unsigned long count = invalidate_mapping_pages(mapping,