From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77EC9C43461 for ; Mon, 7 Sep 2020 06:48:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 51C4B21556 for ; Mon, 7 Sep 2020 06:48:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726770AbgIGGsC (ORCPT ); Mon, 7 Sep 2020 02:48:02 -0400 Received: from verein.lst.de ([213.95.11.211]:47846 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726278AbgIGGsC (ORCPT ); Mon, 7 Sep 2020 02:48:02 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 5A1BB6736F; Mon, 7 Sep 2020 08:47:58 +0200 (CEST) Date: Mon, 7 Sep 2020 08:47:58 +0200 From: Christoph Hellwig To: Mikulas Patocka Cc: Linus Torvalds , Jan Kara , "Darrick J. Wong" , Dave Chinner , Jann Horn , Christoph Hellwig , Oleg Nesterov , Kirill Shutemov , Theodore Ts'o , Andrea Arcangeli , Matthew Wilcox , Andrew Morton , Dan Williams , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org Subject: Re: [PATCH 2/2] xfs: don't update mtime on COW faults Message-ID: <20200907064758.GA19384@lst.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org > +static bool > +xfs_is_write_fault( > + struct vm_fault *vmf) > +{ > + return vmf->flags & FAULT_FLAG_WRITE && vmf->vma->vm_flags & VM_SHARED; > +} This function does not look xfs specific at all. Why isn't it it in fs.h? While we're at it the name sounds rather generic, and there are no good comments. Maybe we just need to split FAULT_FLAG_WRITE into two and check those instead of such crazy workarounds?