sched/migration: Move calc_load_migrate() into CPU_DYING
[cascardo/linux.git] / mm / fadvise.c
index b8a5bc6..b8024fa 100644 (file)
@@ -97,8 +97,8 @@ SYSCALL_DEFINE4(fadvise64_64, int, fd, loff_t, offset, loff_t, len, int, advice)
                break;
        case POSIX_FADV_WILLNEED:
                /* First and last PARTIAL page! */
-               start_index = offset >> PAGE_CACHE_SHIFT;
-               end_index = endbyte >> PAGE_CACHE_SHIFT;
+               start_index = offset >> PAGE_SHIFT;
+               end_index = endbyte >> PAGE_SHIFT;
 
                /* Careful about overflow on the "+1" */
                nrpages = end_index - start_index + 1;
@@ -124,8 +124,8 @@ SYSCALL_DEFINE4(fadvise64_64, int, fd, loff_t, offset, loff_t, len, int, advice)
                 * preserved on the expectation that it is better to preserve
                 * needed memory than to discard unneeded memory.
                 */
-               start_index = (offset+(PAGE_CACHE_SIZE-1)) >> PAGE_CACHE_SHIFT;
-               end_index = (endbyte >> PAGE_CACHE_SHIFT);
+               start_index = (offset+(PAGE_SIZE-1)) >> PAGE_SHIFT;
+               end_index = (endbyte >> PAGE_SHIFT);
 
                if (end_index >= start_index) {
                        unsigned long count = invalidate_mapping_pages(mapping,