|
@@ -452,14 +452,13 @@ static inline int is_page_cache_freeable(struct page *page)
|
|
|
return page_count(page) - page_has_private(page) == 2;
|
|
|
}
|
|
|
|
|
|
-static int may_write_to_queue(struct backing_dev_info *bdi,
|
|
|
- struct scan_control *sc)
|
|
|
+static int may_write_to_inode(struct inode *inode, struct scan_control *sc)
|
|
|
{
|
|
|
if (current->flags & PF_SWAPWRITE)
|
|
|
return 1;
|
|
|
- if (!bdi_write_congested(bdi))
|
|
|
+ if (!inode_write_congested(inode))
|
|
|
return 1;
|
|
|
- if (bdi == current->backing_dev_info)
|
|
|
+ if (inode_to_bdi(inode) == current->backing_dev_info)
|
|
|
return 1;
|
|
|
return 0;
|
|
|
}
|
|
@@ -538,7 +537,7 @@ static pageout_t pageout(struct page *page, struct address_space *mapping,
|
|
|
}
|
|
|
if (mapping->a_ops->writepage == NULL)
|
|
|
return PAGE_ACTIVATE;
|
|
|
- if (!may_write_to_queue(inode_to_bdi(mapping->host), sc))
|
|
|
+ if (!may_write_to_inode(mapping->host, sc))
|
|
|
return PAGE_KEEP;
|
|
|
|
|
|
if (clear_page_dirty_for_io(page)) {
|
|
@@ -924,7 +923,7 @@ static unsigned long shrink_page_list(struct list_head *page_list,
|
|
|
*/
|
|
|
mapping = page_mapping(page);
|
|
|
if (((dirty || writeback) && mapping &&
|
|
|
- bdi_write_congested(inode_to_bdi(mapping->host))) ||
|
|
|
+ inode_write_congested(mapping->host)) ||
|
|
|
(writeback && PageReclaim(page)))
|
|
|
nr_congested++;
|
|
|
|