Re: Writing to the swap space

Andrew Morton (akpm@zip.com.au)
Mon, 06 May 2002 15:29:21 -0700


Pavel Machek wrote:
>
> Hi!
>
> For swsusp, I need to write to the swap space.
>

Ah. That's some left-over code. Reads will be OK, but
writes will be unexpectedly asynchronous. Nothing in
the kernel uses that function for writes so it didn't show up.

--- linux-2.5.14/mm/page_io.c Tue Apr 30 17:56:30 2002
+++ 25/mm/page_io.c Mon May 6 15:24:09 2002
@@ -117,9 +117,6 @@ void rw_swap_page_nolock(int rw, swp_ent
page->mapping = &swapper_space;
if (!rw_swap_page_base(rw, entry, page))
unlock_page(page);
- if (rw == WRITE)
- wait_on_page_writeback(page);
- else
- wait_on_page_locked(page);
+ wait_on_page_locked(page);
page->mapping = NULL;
}

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