Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30642515rwd; Thu, 6 Jul 2023 08:40:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlF7PbkcINuYjN1n2LW5sdT42o7p1xHNX5klnp9ANNXb/6fE0diFmvRQPO9eh0ntwRBZhIr4 X-Received: by 2002:a17:90b:3e8c:b0:263:d6a6:f37c with SMTP id rj12-20020a17090b3e8c00b00263d6a6f37cmr2042335pjb.16.1688658047783; Thu, 06 Jul 2023 08:40:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688658047; cv=none; d=google.com; s=arc-20160816; b=jkYPrFF+smTXZpYgml/ObmXOX5yVx8Q6FctVjMq/Tp0A5U7cEd+1qH1JxfgQLUVpap QiUU0H/ruGLFRvfXUmpD7k5+Voqsz4HHtGlgppe0PRqPHktJkRtG4F3I0aOCPn0q8aMZ K6yPn4nNEvbNInwaPG3TO1JYDQYun1eFH+wHZYna+hLAFeM9Bd61SbnktGjuLyL2T+kh uv0o5oNqB8w2k4EuZUz/rf2ok5hMAqfUwAf372POatEmV6f4xVpiQB46xgIOJ1SBGgXW 8qYlFgL5MNxRy81uAHJzVsck2fKrTo+V/5Dg+T7bVD54RmZccdDjPDEY4Op25rmhOqJ/ u+Cw== 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; bh=Ff0rJ3SgNfaRknc8joHItbIpxJZHPRoQrsYiVsZnaYg=; fh=R0RG07WmKQij3ctbjsXyoiyhoef0gRxBpzuZyeE18Pc=; b=zob1qFnd7PX73VxAy03LFBKo/R1G3N1UKoVbKBQSvT/eNhcXFcCVPBitJK6bCk8zAP clF0MIaWKeOfyAvP84AQKWPEzrZUwMw+R3PCxLtPRy3bDrNL/eKI3C95yieRuGtLEmUP 7w4cTtylAyPyl3CPn37R2i+CDe9hXghE0DlZh4TQtf9g5qc5frhFax34AwtUQiEKSnZT LFgdiCznCguX5S5Cg3pdl1kKCp7XQIhoGRW4UbugoTo2yEoPORPAXFWEN0B+OXgKrLCJ jBEsoBEGkgZ5RnEjeg3abBUNApJSkdGHTdPjgyjU2eqDoD7iJwcPRCh0zddYSMhRntE2 DN7Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 8-20020a630208000000b0055bf134b7b5si1645067pgc.828.2023.07.06.08.40.35; Thu, 06 Jul 2023 08:40:47 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232394AbjGFPMt (ORCPT + 99 others); Thu, 6 Jul 2023 11:12:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229641AbjGFPMs (ORCPT ); Thu, 6 Jul 2023 11:12:48 -0400 Received: from out30-118.freemail.mail.aliyun.com (out30-118.freemail.mail.aliyun.com [115.124.30.118]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F3D7FC; Thu, 6 Jul 2023 08:12:44 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R411e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0Vml4Kei_1688656357; Received: from 192.168.3.2(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0Vml4Kei_1688656357) by smtp.aliyun-inc.com; Thu, 06 Jul 2023 23:12:39 +0800 Message-ID: <4949c20e-177f-7952-7870-41f3b3fd791f@linux.alibaba.com> Date: Thu, 6 Jul 2023 23:12:37 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v2 39/92] erofs: convert to ctime accessor functions To: Jan Kara , Jeff Layton Cc: Christian Brauner , Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu , Al Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-erofs@lists.ozlabs.org References: <20230705185755.579053-1-jlayton@kernel.org> <20230705190309.579783-1-jlayton@kernel.org> <20230705190309.579783-37-jlayton@kernel.org> <20230706110007.dc4tpyt5e6wxi5pt@quack3> From: Gao Xiang In-Reply-To: <20230706110007.dc4tpyt5e6wxi5pt@quack3> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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 Hi Jan, On 2023/7/6 19:00, Jan Kara wrote: > On Wed 05-07-23 15:01:04, Jeff Layton wrote: >> In later patches, we're going to change how the inode's ctime field is >> used. Switch to using accessor functions instead of raw accesses of >> inode->i_ctime. >> >> Acked-by: Gao Xiang >> Signed-off-by: Jeff Layton > > Just one nit below: > >> @@ -176,10 +175,10 @@ static void *erofs_read_inode(struct erofs_buf *buf, >> vi->chunkbits = sb->s_blocksize_bits + >> (vi->chunkformat & EROFS_CHUNK_FORMAT_BLKBITS_MASK); >> } >> - inode->i_mtime.tv_sec = inode->i_ctime.tv_sec; >> - inode->i_atime.tv_sec = inode->i_ctime.tv_sec; >> - inode->i_mtime.tv_nsec = inode->i_ctime.tv_nsec; >> - inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec; >> + inode->i_mtime.tv_sec = inode_get_ctime(inode).tv_sec; >> + inode->i_atime.tv_sec = inode_get_ctime(inode).tv_sec; >> + inode->i_mtime.tv_nsec = inode_get_ctime(inode).tv_nsec; >> + inode->i_atime.tv_nsec = inode_get_ctime(inode).tv_nsec; > > Isn't this just longer way to write: > > inode->i_atime = inode->i_mtime = inode_get_ctime(inode); I'm fine with this. I think we could use this (although I'm not sure if checkpatch will complain but personally I'm fine.) Thanks, Gao Xiang > > ? > > Honza