Well, you also have to check that the page isn't on the LRU list, so it
would have to be something like
!page->mapping && !PageLRU(page)
which I agree is ugly. It's much better to just move the page->flag
setting into the callers (and most of the callers _can_ trivially check
that they are exclusive owners, because most of them will just have
allocated the page ;)
Linus
-
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/