Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
[linux-2.6-block.git] / mm / fadvise.c
index b8a5bc66b0c09b915237ab600cdeceaa81b8d153..b8024fa7101d9a8ff625606de973b9b670d0ecf4 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,