Message ID | 1469189981-19000-10-git-send-email-jack@suse.cz (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
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);
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(-)