Thread (19 messages) 19 messages, 3 authors, 2016-08-09
STALE3627d
Revisions (5)
  1. v2 current
  2. v3 [diff vs current]
  3. v4 [diff vs current]
  4. v4 [diff vs current]
  5. v5 [diff vs current]

[PATCH 09/15] mm: Remove unnecessary vma->vm_ops check

From: Jan Kara <jack@suse.cz>
Date: 2016-07-22 12:19:35
Also in: linux-fsdevel, nvdimm
Subsystem: memory management, memory management - core, the rest · Maintainers: Andrew Morton, David Hildenbrand, Linus Torvalds

We don't check whether vma->vm_ops is NULL in do_shared_fault() so
there's hardly any point in checking it in wp_page_shared() which gets
called only for shared file mappings as well.

Signed-off-by: Jan Kara <jack@suse.cz>
---
 mm/memory.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memory.c b/mm/memory.c
index 6780e5d8145c..61902a5b75c2 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2304,7 +2304,7 @@ static int wp_page_shared(struct mm_struct *mm, struct vm_area_struct *vma,
 
 	get_page(old_page);
 
-	if (vma->vm_ops && vma->vm_ops->page_mkwrite) {
+	if (vma->vm_ops->page_mkwrite) {
 		int tmp;
 
 		pte_unmap_unlock(page_table, ptl);
-- 
2.6.6

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help