the "somebody else has a swap count" is interesting. so we rely on the
fact any swap_duplicate is always run before the swapcache is unlocked.
Also the "> 2" should be "> 1", but really I noticed I cannot avoid
getting a reference so please apply also this patch instead of replacing
"> 2" with "> 1" (it was a race condition):
--- 2.4.10pre11aa1/mm/vmscan.c.~1~ Tue Sep 18 21:23:49 2001
+++ 2.4.10pre11aa1/mm/vmscan.c Thu Sep 20 01:29:58 2001
@@ -415,7 +415,10 @@
spin_unlock(&pagemap_lru_lock);
ClearPageDirty(page);
+
+ page_cache_get(page);
writepage(page);
+ page_cache_release(page);
spin_lock(&pagemap_lru_lock);
continue;
> And we check for the "somebody else has a swap count" two lines lower.
I see.
> Do you see anything wrong with that logic?
Looks ok now :), I guess it would be good to write a comment now, so
maybe other people won't share my worry, the swap_count thing wasn't
very obvious. thanks,
Andrea
-
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/