Merge branch 'for-linus' of git://git.kernel.dk/linux-block
[deliverable/linux.git] / mm / page-writeback.c
index eeaa431ee4ec034563239b9a285253f7291ae0db..bc5149d5ec38016da91a8b1c85aeca0193143f0c 100644 (file)
@@ -2178,8 +2178,8 @@ int write_cache_pages(struct address_space *mapping,
                        cycled = 0;
                end = -1;
        } else {
-               index = wbc->range_start >> PAGE_CACHE_SHIFT;
-               end = wbc->range_end >> PAGE_CACHE_SHIFT;
+               index = wbc->range_start >> PAGE_SHIFT;
+               end = wbc->range_end >> PAGE_SHIFT;
                if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX)
                        range_whole = 1;
                cycled = 1; /* ignore range_cyclic tests */
@@ -2384,14 +2384,14 @@ int write_one_page(struct page *page, int wait)
                wait_on_page_writeback(page);
 
        if (clear_page_dirty_for_io(page)) {
-               page_cache_get(page);
+               get_page(page);
                ret = mapping->a_ops->writepage(page, &wbc);
                if (ret == 0 && wait) {
                        wait_on_page_writeback(page);
                        if (PageError(page))
                                ret = -EIO;
                }
-               page_cache_release(page);
+               put_page(page);
        } else {
                unlock_page(page);
        }
@@ -2433,7 +2433,7 @@ void account_page_dirtied(struct page *page, struct address_space *mapping)
                __inc_zone_page_state(page, NR_DIRTIED);
                __inc_wb_stat(wb, WB_RECLAIMABLE);
                __inc_wb_stat(wb, WB_DIRTIED);
-               task_io_account_write(PAGE_CACHE_SIZE);
+               task_io_account_write(PAGE_SIZE);
                current->nr_dirtied++;
                this_cpu_inc(bdp_ratelimits);
        }
@@ -2452,7 +2452,7 @@ void account_page_cleaned(struct page *page, struct address_space *mapping,
                mem_cgroup_dec_page_stat(page, MEM_CGROUP_STAT_DIRTY);
                dec_zone_page_state(page, NR_FILE_DIRTY);
                dec_wb_stat(wb, WB_RECLAIMABLE);
-               task_io_account_cancelled_write(PAGE_CACHE_SIZE);
+               task_io_account_cancelled_write(PAGE_SIZE);
        }
 }
 
This page took 0.026037 seconds and 5 git commands to generate.