[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] swap_state.c thinko
Hey folks,
Here's another one liner that closes an smp race that could corrupt
things.
-ben
diff -urN v2.4.3/mm/swap_state.c work-2.4.3/mm/swap_state.c
--- v2.4.3/mm/swap_state.c Fri Dec 29 18:04:27 2000
+++ work-2.4.3/mm/swap_state.c Thu Apr 5 11:55:00 2001
@@ -140,7 +140,7 @@
/*
* If we are the only user, then try to free up the swap cache.
*/
- if (PageSwapCache(page) && !TryLockPage(page)) {
+ if (!TryLockPage(page) && PageSwapCache(page)) {
if (!is_page_shared(page)) {
delete_from_swap_cache_nolock(page);
}
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/