]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix: writing to the swap space
authorAndrew Morton <akpm@zip.com.au>
Tue, 7 May 2002 03:33:53 +0000 (20:33 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Tue, 7 May 2002 03:33:53 +0000 (20:33 -0700)
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.

mm/page_io.c

index b4741261d1dd012a2f8d742507111d9a81693592..05594b07aba9ad7807593e4fe2b364ed42beb93d 100644 (file)
@@ -117,9 +117,6 @@ void rw_swap_page_nolock(int rw, swp_entry_t entry, char *buf)
        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;
 }