Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751855AbaLPQTA (ORCPT ); Tue, 16 Dec 2014 11:19:00 -0500 Received: from gum.cmpxchg.org ([85.214.110.215]:54904 "EHLO gum.cmpxchg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751769AbaLPQSi (ORCPT ); Tue, 16 Dec 2014 11:18:38 -0500 From: Johannes Weiner To: Andrew Morton Cc: Tejun Heo , Hugh Dickins , Michel Lespinasse , Jan Kara , "Kirill A. Shutemov" , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [patch 2/3] mm: memory: remove ->vm_file check on shared writable vmas Date: Tue, 16 Dec 2014 11:18:10 -0500 Message-Id: <1418746691-326-3-git-send-email-hannes@cmpxchg.org> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1418746691-326-1-git-send-email-hannes@cmpxchg.org> References: <1418746691-326-1-git-send-email-hannes@cmpxchg.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Shared anonymous mmaps are implemented with shmem files, so all VMAs with shared writable semantics also have an underlying backing file. Signed-off-by: Johannes Weiner Reviewed-by: Jan Kara Acked-by: Kirill A. Shutemov --- mm/memory.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index 4c06cdcd36cf..d5a303cf2901 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2155,9 +2155,7 @@ reuse: balance_dirty_pages_ratelimited(mapping); } - /* file_update_time outside page_lock */ - if (vma->vm_file) - file_update_time(vma->vm_file); + file_update_time(vma->vm_file); } put_page(dirty_page); if (page_mkwrite) { @@ -3013,8 +3011,7 @@ static int do_shared_fault(struct mm_struct *mm, struct vm_area_struct *vma, balance_dirty_pages_ratelimited(mapping); } - /* file_update_time outside page_lock */ - if (vma->vm_file && !vma->vm_ops->page_mkwrite) + if (!vma->vm_ops->page_mkwrite) file_update_time(vma->vm_file); return ret; -- 2.1.3 -- 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/