On Mon, 2007-10-29 at 11:11 +0100, Peter Zijlstra wrote:Something like this --- mm/memory.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Index: linux-2.6/mm/memory.c =================================================================== --- linux-2.6.orig/mm/memory.c +++ linux-2.6/mm/memory.c @@ -2300,6 +2300,8 @@ static int __do_fault(struct mm_struct * * to become writable */ if (vma->vm_ops->page_mkwrite) { + struct address_space *mapping = page->mapping; + unlock_page(page); if (vma->vm_ops->page_mkwrite(vma, page) < 0) { ret = VM_FAULT_SIGBUS; @@ -2314,7 +2316,7 @@ static int __do_fault(struct mm_struct * * reworking page_mkwrite locking API, which * is better done later. */ - if (!page->mapping) { + if (mapping != page->mapping) { ret = 0; anon = 1; /* no anon but release vmf.page */ goto out; -
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Jeff Garzik | Re: fallocate-implementation-on-i86-x86_64-and-powerpc.patch |
git: | |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Arjan van de Ven | Re: [GIT]: Networking |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Natalie Protasevich | [BUG] New Kernel Bugs |
