Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1658486rwr; Thu, 20 Apr 2023 19:50:39 -0700 (PDT) X-Google-Smtp-Source: AKy350aewbJKt2k46tXE74EZEPm9yKDv+AJMIaViBU5rNeQwTi3STKdkt3RHDX3ZrkcJSxkoL2RY X-Received: by 2002:a17:902:8307:b0:1a6:f93a:a135 with SMTP id bd7-20020a170902830700b001a6f93aa135mr3339050plb.61.1682045439298; Thu, 20 Apr 2023 19:50:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682045439; cv=none; d=google.com; s=arc-20160816; b=sSDndkkmqcg3bS9xRKDiY2CmtGzF14v2CEkyvFyq1xmN28RbCNO0RpnVOZ9pHufeBT 1w+rvyYtIRQ6I0wX5OPlOhGyOKBCC2BDkX46hzRhIhMeiZlszS7TELosyUN9X4yukOgM 95yU0n9lxHorJO1Egmn4TpSdu4o1mBnKCSKZNi78so3WV4nNhNVjEcK5cB4cBbj4p/aD 7IM3W4CfLuhJdb7F4p2933yuL0HaXdQpmJBsBUmdn9QUoTp3o0xnbqKvB/q/ixvpatOl QPKe7eTkF58PldYCLGwm62fx6tvsp0V0oKvRkrs9Ohgk5j8JEIIeOJQ37V8p2/9U5eb6 mztg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id :dkim-signature; bh=FC3uz3gEeDwUT9qANCoJYl9NnUOABJ1f95MOH7VMpuc=; b=q+ljpOt6s7RC/RecGnDQlVaDUhwzP1fjHyoOn0K4h1/JCa0V/3N3DaHtH3Fh3vkOUp xaeBqHYKRMwBHkylko2gMhwqgKxQ76YXgHLhjMf7lLPGZS29IIhzB6Gy9aQF102AJE4Q yVDPwMpidMdrWuWq2Dp9ob/WDF1C735JaDp0QWvJjdMgu/PAJdmps1wH6AKEgG3qiGit OwI3naS2UfZRUs1uTnN9PFCJEU1lzVI+o3HikehmJejHcG6zBL4lCyFJK2uBlSny3MKh qo5CPLdEIiGf+3r0niZmEdeLO4uPbu+5lKzDHCYogwEGiupgm2koDvA8xsrKlSyMvyn6 o7IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shopee.com header.s=shopee.com header.b=Gn3pgLGP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=shopee.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e13-20020a170902784d00b001a63911f1bcsi2985772pln.141.2023.04.20.19.50.27; Thu, 20 Apr 2023 19:50:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@shopee.com header.s=shopee.com header.b=Gn3pgLGP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=shopee.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233397AbjDUCuO (ORCPT + 99 others); Thu, 20 Apr 2023 22:50:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233278AbjDUCuM (ORCPT ); Thu, 20 Apr 2023 22:50:12 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9A1F4C01 for ; Thu, 20 Apr 2023 19:50:10 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-63b50a02bffso1592569b3a.2 for ; Thu, 20 Apr 2023 19:50:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shopee.com; s=shopee.com; t=1682045410; x=1684637410; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=FC3uz3gEeDwUT9qANCoJYl9NnUOABJ1f95MOH7VMpuc=; b=Gn3pgLGPLd8mPkp8WDMhV9L0EQppCPrSzFzx78KyV7+CMkiFXte/ID6qSfuysmUgsY LGVmrEU5TOfMIXuKixliS53AqXX4GGeNnJmrb1iahHjPyTNt6xEtN9PUnh6gbM2x68a8 bJa9xCo8jgnKA8X8bJeIvAMWjfPTin8edMh7cvtAp2X5a8ZKLdGhhOELyUjBbatw/2pm ZYuU3zT83UGQsriXMTsCt3Ow9Nww1Kirpn3PEI7L1zo+sxPAcA1hDkCAH1XQ7n9M6c9r HlOMy+myeWHzNvu9L1Blfhed/YTzCLplOOioNEEhgqluUvRvBYWymoRCkgqRdONp4I1V pP4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682045410; x=1684637410; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=FC3uz3gEeDwUT9qANCoJYl9NnUOABJ1f95MOH7VMpuc=; b=dHueLo2kqk4gPq0FPkF5W+cstGsK5pzPEObSqydEpKbpkedl5lpt7CmjM7E8sIrj4G O5QP6RQ8Knwq9FaT4QBCMlGTIfnKfS3fcNzqug1BRZWR0FShg9TPWBVqT05bc30+Xlrg 8Y6FLPH/8hKcq5odHqMViifMOlvgmsJhR6dV+OMB38UdjIEbsF8evxYrIgSN/bKc69S5 ljK0z8vRCTdPZ+lUGSB7WJhWs7ysOdiO2gBrfT2Dh3YIs9o36tUrPkmfgVodPp0hPvkj FfQrxDkwSFfpq3cU4Mcst0X8JSGQcDsCTjFMW4b5Vlf+gov9La5zluy4tt0vcxZo4Jeg wiWQ== X-Gm-Message-State: AAQBX9e8R98vrmFMqDLlEL3MpNSVIkkxor5jw+4sqqIfU0CKWvATqOAs Kaz5sk95aZyMo4fKOoGqpNiCrQ== X-Received: by 2002:a05:6a20:748c:b0:f0:fa9b:d4c7 with SMTP id p12-20020a056a20748c00b000f0fa9bd4c7mr5033510pzd.55.1682045410027; Thu, 20 Apr 2023 19:50:10 -0700 (PDT) Received: from [10.54.24.141] ([143.92.118.3]) by smtp.gmail.com with ESMTPSA id q10-20020a65624a000000b00524b02ff569sm1667671pgv.64.2023.04.20.19.50.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Apr 2023 19:50:09 -0700 (PDT) Message-ID: <2b0e06e0-5dd4-8ca7-6d85-b492468fd71a@shopee.com> Date: Fri, 21 Apr 2023 10:50:05 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH v2 2/2] vfs: clean up d_backing_inode() function To: Al Viro Cc: mszeredi@redhat.com, bigeasy@linutronix.de, mcgrof@kernel.org, xiubli@redhat.com, linux-kernel@vger.kernel.org References: <20230419104704.243950-1-haifeng.xu@shopee.com> <20230420204545.GN3390869@ZenIV> From: Haifeng Xu In-Reply-To: <20230420204545.GN3390869@ZenIV> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/4/21 04:45, Al Viro wrote: > On Wed, Apr 19, 2023 at 10:47:04AM +0000, Haifeng Xu wrote: >> d_backing_inode() does the same thing with d_inode(), so using >> d_inode() to get the inode of dentry instead of d_backing_inode(). >> >> Signed-off-by: Haifeng Xu >> Suggested-by: Miklos Szeredi > > Fine by me, but generally that kind of search-and-replace is > better done differently: > > 1) patch replacing the definition of d_backing_inode() with > #define d_backing_inode d_inode > > 2) mail to Linus, asking to do mechanical search-and-replace > just prior to -rc1; see e.g. 7c0f6ba682b9 for example of > that being done. In this case the script would be > sed -i -e "s/\/d_inode/g" $(git grep -l -w "d_backing_inode") > sed -i -e "/#define d_inode d_inode/d" include/linux/dentry.h Thanks for your suggestion. The file "include/linux/dentry.h" doesn't exist, do you mean "include/linux/dcache.h"? By the way, why we need to add a definiton first and delete it later instead of replacing the "d_backing_inode" directly? In addition, there's another patch need to be reviewed. link: https://lore.kernel.org/all/20230419072736.172593-1-haifeng.xu@shopee.com/ Thanks!