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=-4.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 549B5C433E2 for ; Sat, 5 Sep 2020 17:03:43 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D25F12078E for ; Sat, 5 Sep 2020 17:03:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="b0r56yrM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D25F12078E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 29CA16B0037; Sat, 5 Sep 2020 13:03:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2261D6B0055; Sat, 5 Sep 2020 13:03:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 115526B005A; Sat, 5 Sep 2020 13:03:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0044.hostedemail.com [216.40.44.44]) by kanga.kvack.org (Postfix) with ESMTP id ED25D6B0037 for ; Sat, 5 Sep 2020 13:03:41 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id B3BED362A for ; Sat, 5 Sep 2020 17:03:41 +0000 (UTC) X-FDA: 77229629442.29.joke77_1e04d8c270bc Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id 8B2E918086592 for ; Sat, 5 Sep 2020 17:03:41 +0000 (UTC) X-HE-Tag: joke77_1e04d8c270bc X-Filterd-Recvd-Size: 5050 Received: from mail-lj1-f193.google.com (mail-lj1-f193.google.com [209.85.208.193]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Sat, 5 Sep 2020 17:03:41 +0000 (UTC) Received: by mail-lj1-f193.google.com with SMTP id a22so5057212ljp.13 for ; Sat, 05 Sep 2020 10:03:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yq3SfrK7yZAtmYRnvDmja3vYq8mdQSVjPiEi6mwaMYI=; b=b0r56yrMlN887hWaFszKtt3otNFfkTZGY9PBeAnyiPugAfYpUMCfOTBWDohK5Luc/G +LqYWBwLdx1jUaxLPC79yX0fHBJTRyN1py7Wq/ZzjBRr+LK88BEB8cL1Zhj8z/OzGL05 1K+nOaaiL2yDxhltK+DQ4feWYgd8jEHvr7JnM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yq3SfrK7yZAtmYRnvDmja3vYq8mdQSVjPiEi6mwaMYI=; b=fR9XZu3cD6IXSV2yqROk15KnZ5f9hoNLIJPhdAmtFX9Imb/kBNI1Wz7s/QOeLENjHY SS8+6vo5d4xq6N6q0AP8Yn+1VMGz0yukXLumB+P+HU9tVTSjySpJMF8sX30mYTvVcnbd x1JgbN5uxIZczPWCz2RTvT7nEaIfxdmStT2UmfmYDY4AiZBPMB7Xy+AGEe/e0zzzdA/z BalLVNAfcZoxA+jN7XCUV12owUk0aWiH3s/SM1bxNH901Pddqd4Fo0eb1Gjf4wvy85he pZlbTMUI2bOQQ0Sevl2TIew0dGKIQ9Jh562yaEbjCcCKRyFvayNKH5DtqbE4791fcicB QtFw== X-Gm-Message-State: AOAM532joqffqFJ5QlIU8nHfJrHid2W0lyDcRh8mVUZtYz4ra/RtB+KO 3Mv59F/qPWCbSkzStwsLGyey4Vo8Xuv+Bw== X-Google-Smtp-Source: ABdhPJzpyx13/BLAn465C41ROzRnsrGdKS88sKxs966tm+aDbZBniTR4ZZd55QHCRdTDyT2dB2rO2A== X-Received: by 2002:a2e:b1c4:: with SMTP id e4mr6717208lja.379.1599325418910; Sat, 05 Sep 2020 10:03:38 -0700 (PDT) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com. [209.85.167.53]) by smtp.gmail.com with ESMTPSA id k10sm2364974lja.112.2020.09.05.10.03.37 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 05 Sep 2020 10:03:37 -0700 (PDT) Received: by mail-lf1-f53.google.com with SMTP id u27so5433940lfm.13 for ; Sat, 05 Sep 2020 10:03:37 -0700 (PDT) X-Received: by 2002:a05:6512:403:: with SMTP id u3mr6534077lfk.10.1599325416665; Sat, 05 Sep 2020 10:03:36 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Sat, 5 Sep 2020 10:03:20 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/2] xfs: don't update mtime on COW faults To: Mikulas Patocka Cc: 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 , Linux Kernel Mailing List , linux-nvdimm , Ext4 Developers List , linux-xfs Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 8B2E918086592 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat, Sep 5, 2020 at 9:47 AM Linus Torvalds wrote: > > So your patch is obviously correct, [..] Oh, and I had a xfs pull request in my inbox already, so rather than expect Darrick to do another one just for this and have Jan do one for ext2, I just applied these two directly as "ObviouslyCorrect(tm)". I added the "inline" as suggested by Darrick, and I also added parenthesis around the bit tests. Yes, I know the C precedence rules, but I just personally find the code easier to read if I don't even have to think about it and the different subexpressions of a logical operation are just visually very clear. And as I was editing the patch anyway... So that xfs helper function now looks like this +static inline bool +xfs_is_write_fault( + struct vm_fault *vmf) +{ + return (vmf->flags & FAULT_FLAG_WRITE) && + (vmf->vma->vm_flags & VM_SHARED); +} instead. Linus