Re: [PATCH -mm 05/25] define page_file_cache() function

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Friday, June 6, 2008 - 6:04 pm

On Fri, 06 Jun 2008 16:28:43 -0400
Rik van Riel <riel@redhat.com> wrote:


argh.  How many are left?


2?

Maybe bool would suit here.

Maybe a better name would be page_is_file_cache().  The gnu (gcc?)
convention of putting _p at the end of predicate functions' names makes
heaps of sense.


This function doesn't do enough stuff to do that which it says it does.
There must be a whole pile of preconditions which the caller must
evaluate before this function can be usefully used.  I mean, it would
be a bug to pass an anonymous page or a slab page or whatever into
here?


Those __ClearPageFoo() functions scare my pants into the next suburb. 
They can cause such horridly subtle bugs if misused.  Every single
callsite should have special attention and careful justification in
comments, IMO.


OK, someone lost their tab key and it wasn't you.

<does git-blame>

<blames Nick>


OK, that one isn't so scary.


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH -mm 05/25] define page_file_cache() function, Rik van Riel, (Fri Jun 6, 1:28 pm)
Re: [PATCH -mm 05/25] define page_file_cache() function, Andrew Morton, (Fri Jun 6, 6:04 pm)