Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1216751

[PATCH] mm, dax: VMA with vm_ops->pfn_mkwrite wants to be write-notified

From "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Newsgroups linux.kernel
Subject [PATCH] mm, dax: VMA with vm_ops->pfn_mkwrite wants to be write-notified
Date 2015-09-01 12:30 +0200
Message-ID <q3QZc-3MN-11@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


For VM_PFNMAP and VM_MIXEDMAP we use vm_ops->pfn_mkwrite instead of
vm_ops->page_mkwrite to notify abort write access. This means we want
vma->vm_page_prot to be write-protected if the VMA provides this vm_ops.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Yigal Korman <yigal@plexistor.com>
Cc: Boaz Harrosh <boaz@plexistor.com>
Cc: Matthew Wilcox <matthew.r.wilcox@intel.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Dave Chinner <david@fromorbit.com>
---
 mm/mmap.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/mmap.c b/mm/mmap.c
index df6d5f07035b..3f78bceefe5a 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1498,7 +1498,8 @@ int vma_wants_writenotify(struct vm_area_struct *vma)
 		return 0;
 
 	/* The backer wishes to know when pages are first written to? */
-	if (vma->vm_ops && vma->vm_ops->page_mkwrite)
+	if (vma->vm_ops &&
+			(vma->vm_ops->page_mkwrite || vma->vm_ops->pfn_mkwrite))
 		return 1;
 
 	/* The open routine did something to the protections that pgprot_modify
-- 
2.5.0

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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] mm, dax: VMA with vm_ops->pfn_mkwrite wants to be write-notified "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2015-09-01 12:30 +0200
  Re: [PATCH] mm, dax: VMA with vm_ops->pfn_mkwrite wants to be write-notified Boaz Harrosh <boaz@plexistor.com> - 2015-09-01 13:00 +0200
    Re: [PATCH] mm, dax: VMA with vm_ops->pfn_mkwrite wants to be  write-notified "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-09-01 13:20 +0200
      Re: [PATCH] mm, dax: VMA with vm_ops->pfn_mkwrite wants to be write-notified Boaz Harrosh <boaz@plexistor.com> - 2015-09-01 13:30 +0200

csiph-web