On 05/11/2013 06:23 PM, Kirill A. Shutemov wrote:
> From: "Kirill A. Shutemov" <kirill.shute...@linux.intel.com>
> 
> It's confusing that mk_huge_pmd() has sematics different from mk_pte()
> or mk_pmd().
> 
> Let's move maybe_pmd_mkwrite() out of mk_huge_pmd() and adjust
> prototype to match mk_pte().

Was there a motivation to do this beyond adding consistency?  Do you use
this later or something?

> @@ -746,7 +745,8 @@ static int __do_huge_pmd_anonymous_page(struct mm_struct 
> *mm,
>               pte_free(mm, pgtable);
>       } else {
>               pmd_t entry;
> -             entry = mk_huge_pmd(page, vma);
> +             entry = mk_huge_pmd(page, vma->vm_page_prot);
> +             entry = maybe_pmd_mkwrite(pmd_mkdirty(entry), vma);
>               page_add_new_anon_rmap(page, vma, haddr);
>               set_pmd_at(mm, haddr, pmd, entry);

I'm not the biggest fan since this does add lines of code, but I do
appreciate the consistency it adds, so:

Acked-by: Dave Hansen <dave.han...@linux.intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to