[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix sys_mount not to free_page(0)




On Fri, 6 Aug 1999, Kanoj Sarcar wrote:
> > 
> > free_page(0) is actually supposed to work. Doesn't it?
> 
> Umm, it does ... I was thinking it was happenstance, and not by design.

It's by design - I am of the religion that thinks that

	free(malloc());

is always legal, even when the malloc() fails.

> Is it worthwhile to clean this up, or do other places in the code rely
> on this behavior of free_page?

There might be any number of places who just free a page, it doesn't even
slow down free_page(), because the 0 case just falls out quite naturally
from having to test for out-of-range and reserved pages anyway.

		Linus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/