Re: [PATCH] swap_state.c thinko

Rik van Riel
2001-04-05T16:05:38Z

On Thu, 5 Apr 2001, Ben LaHaise wrote:

> Here's another one liner that closes an smp race that could corrupt
> things.

> - if (PageSwapCache(page) && !TryLockPage(page)) {
> + if (!TryLockPage(page) && PageSwapCache(page)) {
> if (!is_page_shared(page)) {
> delete_from_swap_cache_nolock(page);
> }

I sure hope the page is unlocked afterwards, regardless of
whether it's (still) in the swap cache or not ...

regards,

Rik
--
Virtual memory is like a game you can't win;
However, without VM there's truly nothing to lose...

http://www.surriel.com/
http://www.conectiva.com/ http://distro.conectiva.com.br/