Re: [PATCH] hugepage: support ZERO_PAGE()
From: Adam Litke
Date: Tue Sep 02 2008 - 13:29:22 EST
On Tue, 2008-09-02 at 10:21 +0900, KOSAKI Motohiro wrote:
> +static int huge_zeropage_ok(pte_t *ptep, int write, int shared)
> +{
> + if (!ptep)
> + return 0;
> +
> + if (write)
> + return 0;
> +
> + if (shared)
> + return 0;
> +
> + return huge_pte_none(huge_ptep_get(ptep));
> +}
In addition to the comments from Mel, I'd like to see this function
collapsed a bit...
if (!ptep || write || shared)
return 0;
else
return huge_pte_none(huge_ptep_get(ptep));
--
Adam Litke - (agl at us.ibm.com)
IBM Linux Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/