--- swap12/mm/vmscan.c Tue Mar 25 20:43:07 2003
+++ swap13/mm/vmscan.c Tue Mar 25 20:45:08 2003
@@ -235,7 +235,6 @@
pagevec_init(&freed_pvec, 1);
while (!list_empty(page_list)) {
struct page *page;
- int may_enter_fs;
page = list_entry(page_list->prev, struct page, lru);
list_del(&page->lru);
@@ -248,8 +247,6 @@
(*nr_mapped)++;
BUG_ON(PageActive(page));
- may_enter_fs = (gfp_mask & __GFP_FS) ||
- (PageSwapCache(page) && (gfp_mask & __GFP_IO));
if (PageWriteback(page))
goto keep_locked;
@@ -315,15 +312,19 @@
* See swapfile.c:page_queue_congested().
*/
if (PageDirty(page)) {
+ struct backing_dev_info *bdi;
+
if (!is_page_cache_freeable(page))
goto keep_locked;
if (!mapping)
goto keep_locked;
if (mapping->a_ops->writepage == NULL)
goto activate_locked;
- if (!may_enter_fs)
+ bdi = mapping->backing_dev_info;
+ if (!(gfp_mask & (bdi->memory_backed?
+ __GFP_IO: __GFP_FS)))
goto keep_locked;
- if (!may_write_to_queue(mapping->backing_dev_info))
+ if (!may_write_to_queue(bdi))
goto keep_locked;
write_lock(&mapping->page_lock);
if (test_clear_page_dirty(page)) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/