Re: [RESEND][PATCH 4/6] Add page becoming writable notification

From: Christoph Hellwig
Date: Thu Oct 14 2004 - 16:07:43 EST


> +
> + /* notification that a page is about to become writable */
> + int (*page_mkwrite)(struct page *page);

This doesn't fit into address_space operations at all. The vm_operation
below is enough.

> --- linux-2.6.9-rc1-mm2/mm/memory.c 2004-08-31 16:52:40.000000000 +0100
> +++ linux-2.6.9-rc1-mm2-cachefs/mm/memory.c 2004-09-02 15:40:26.000000000 +0100
> @@ -1030,6 +1030,54 @@ static inline void break_cow(struct vm_a
> }
>
> /*
> + * Make a PTE writeable for do_wp_page() on a shared-writable page
> + */
> +static inline int do_wp_page_mk_pte_writable(struct mm_struct *mm,
> + struct vm_area_struct *vma,
> + unsigned long address,
> + pte_t *page_table,
> + struct page *old_page,
> + pte_t pte)

This prototype shows pretty much that splitting it out doesn't make much sense.
Why not add a goto reuse_page; where you call it currently and append it
at the end of do_wp_page?

-
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/