From: Paolo 'Blaisorblade' Giarrusso Seems like on 2.4.9.4 this comment got out of sync ;-) I'm not completely sure on which basis we don't need any more to do as the comment suggests, but it seems that when faulting in a second time the same swap page, can_share_swap_page() returns false, and we do an early COW break, so there's no need to write-protect the page. No idea why we don't defer the COW break. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Cc: Hugh Dickins Signed-off-by: Andrew Morton --- mm/swapfile.c | 5 +---- 1 files changed, 1 insertion(+), 4 deletions(-) diff -puN mm/swapfile.c~remove-stale-comment-from-swapfilec mm/swapfile.c --- 25/mm/swapfile.c~remove-stale-comment-from-swapfilec Wed Aug 17 14:51:10 2005 +++ 25-akpm/mm/swapfile.c Wed Aug 17 14:51:10 2005 @@ -398,10 +398,7 @@ void free_swap_and_cache(swp_entry_t ent } /* - * Always set the resulting pte to be nowrite (the same as COW pages - * after one process has exited). We don't know just how many PTEs will - * share this swap entry, so be cautious and let do_wp_page work out - * what to do if a write is requested later. + * Since we're swapping it in, we mark it as old. * * vma->vm_mm->page_table_lock is held. */ _