Re: oops if free a locked page

Andrea Arcangeli (andrea@suse.de)
Wed, 23 Jun 1999 16:47:08 +0200 (CEST)


On Wed, 23 Jun 1999, Stephen C. Tweedie wrote:

>More than that, if you even so much as remove the locked block/page from
>the hash lists, you prevent any future access from discovering the
>existing lock on those disk blocks --- a sure invitation to data
>corruption.

That wasn't my case. Technically I could run safe also in the old way
simply replacing the:

free_page()
{
if (last_reference)
{
if (locked)
Oops();
}
}

with:

free_page()
{
if (last_reference)
{
if (locked)
unlock();
}
}

but I was looking only my specific case, and now that I see the whole
picture I agree that in general is far better to forbid a locked page to
be freed (and it's also more efficient :).

Andrea Arcangeli

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/