Messages in this thread | | | Date | Tue, 6 Mar 2007 23:19:09 -0800 | From | Bill Irwin <> | Subject | Re: [patch 4/6] mm: merge populate and nopage into fault (fixes nonlinear) |
| |
On Tue, Mar 06, 2007 at 10:51:01PM -0800, Andrew Morton wrote: > Does anybody really pass a NULL `type' arg into filemap_nopage()?
The major vs. minor fault accounting patch that introduced the argument didn't make non-NULL type arguments a requirement. It's essentially an optional second return value and the NULL pointer represents the caller choosing to ignore it. I'm not sure I actually liked that aspect of it, but that's how it ended up going in. I think it had something to do with driver churn clashing with the sweep at the time of the merge. I'd rather the argument be mandatory and defaulted to VM_FAULT_MINOR.
It's something of a non-answer, though, since it only discusses a convention as opposed to reviewing specific callers of filemap_nopage(). NULL type arguments to ->nopage() are rare at most, and could be easily eliminated, at least for in-tree drivers.
egrep -nr 'nopage.*NULL' . 2>/dev/null | grep -v '^Bin' on a current git tree yields zero matches.
-- wli - 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/
| |