[patch 10/16] give swapper_space a set_page_dirty a_op

Andrew Morton (akpm@zip.com.au)
Sat, 01 Jun 2002 01:42:48 -0700


Give swapper_space a ->set_page_dirty() address_space_operation.

So swapcache pages do not need special-casing in
set_page_dirty_buffers().

=====================================

--- 2.5.19/mm/swap_state.c~swap-set_page_dirty Sat Jun 1 01:18:11 2002
+++ 2.5.19-akpm/mm/swap_state.c Sat Jun 1 01:18:11 2002
@@ -48,9 +48,10 @@ static int swap_vm_writeback(struct page
}

static struct address_space_operations swap_aops = {
- vm_writeback: swap_vm_writeback,
- writepage: swap_writepage,
- sync_page: block_sync_page,
+ vm_writeback: swap_vm_writeback,
+ writepage: swap_writepage,
+ sync_page: block_sync_page,
+ set_page_dirty: __set_page_dirty_nobuffers,
};

/*
--- 2.5.19/mm/page-writeback.c~swap-set_page_dirty Sat Jun 1 01:18:11 2002
+++ 2.5.19-akpm/mm/page-writeback.c Sat Jun 1 01:18:11 2002
@@ -497,7 +497,7 @@ int __set_page_dirty_buffers(struct page

spin_lock(&mapping->private_lock);

- if (page_has_buffers(page) && !PageSwapCache(page)) {
+ if (page_has_buffers(page)) {
struct buffer_head *head = page_buffers(page);
struct buffer_head *bh = head;

-
-
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/