Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9515599rwd; Wed, 21 Jun 2023 08:21:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Yc7st6vrd7INSB3JdglywZ+Ar7OMYWAEhid7yUA7ZzyfNpJ1KZXMplsWW1FA7stcI329E X-Received: by 2002:a05:6a20:4fa3:b0:117:eaef:53 with SMTP id gh35-20020a056a204fa300b00117eaef0053mr18072273pzb.35.1687360891987; Wed, 21 Jun 2023 08:21:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687360891; cv=none; d=google.com; s=arc-20160816; b=Un1OeQ7TV6wmz4ZZorgWv+LefynkkNbUGgJLv8GC362/XNt7ye7uQQW19lKSre1aJK M63cKNniYckSPr3cA+rDfruqObiS744CrKyMF8HWuGQFYJ5aZhtrlLVUkNmfneKGF1Vu JBeeOEBZHkN4UXnpUKrURtwI49S4Osh9WwscneJgxa7NoFWplug8Hrom1p72dH7SHCmS IBjW0HtCUqBhwrLs0G9YErYYw9PLEbagt6vhaYB+4zSoCxw7+Xwp4vImTp8S0kCN2pV3 OorhtwPP1f4Kj01D5m9fnm0dXXFWI3LsDwVnvVzgSxU/c819rIlVGJ4dEqYFy/sTsqxP +Ftw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rjyv/ZfLH/+j9nbO1xqaYK0MxAV8TyMP3hIYgtwqIb0=; b=PY4hjDG8eOgxZLhiEha6ITfJSoRuZwRfGHC3HfF5CPfC7Fb/AnhRWkf3ZJxDHLrDuU /91MFcg97pGLxvLy6lHdMZSzAaBKO1XhKyflznlAF+Fsz1NiWbZ2eluofA7nUDLkfpeH bPRh2v3eiAacNWw2aKwDce9oensIGn+o3a4i05MWq2sn9BVAa1Ll57pF0vInuw4wW5qL 6jXhGLvaZX4XAKv0nu12C3e5XMSeglNlRq133Ss6HbiwskSOcnFVAwIS4CQDXhbi+Urf pvj1f91NLtuXWxjTyLvM3P9+RYh2Uqq9NonOSmBILnnG56T4SVdLgaH5PY1RIir5Xph5 K6tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="c/Kn/Xvv"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d9-20020a170902cec900b001a94f85b0besi716303plg.406.2023.06.21.08.21.20; Wed, 21 Jun 2023 08:21:31 -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=@kernel.org header.s=k20201202 header.b="c/Kn/Xvv"; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232314AbjFUOyU (ORCPT + 99 others); Wed, 21 Jun 2023 10:54:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232713AbjFUOxY (ORCPT ); Wed, 21 Jun 2023 10:53:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 002B930F5; Wed, 21 Jun 2023 07:49:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1502B615B9; Wed, 21 Jun 2023 14:49:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B365BC433C8; Wed, 21 Jun 2023 14:49:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687358979; bh=DSeTksfqnRw4FPVrRQ9ashItXalQw8m2rHVJuaKZBs4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c/Kn/XvvVsITo8FQUfTG+bY74x6zwNwFkqyhsvhEA1OTNe00SnnVIep87P4pGse12 fhelK49W869TtAV6JGbsapApb8i2ZcNUZ7goPFtvhOEej5uUpRxCe+LVI6tQER46g9 NbihuwRsHvso4Qas5urVBeYh/aOWEBWzsl+EnbJuGot8oolfmboWUwM+zGAVFwx2Py Ss711xinjZrvbBC1s2qJ6PNWq1WX3jzlsg1Z9Te0Kx2iYn+ry/pGXN7gZMgsMdQ5Hz YpFDwc6ycBJxSsp5zocIXQyw8Ec8Ssk1TFWtmUUK7MNvbZ1yqcQtCBkVG/eKdEyMxt BBnxPy+p12uQg== From: Jeff Layton To: Christian Brauner , Damien Le Moal , Naohiro Aota , Johannes Thumshirn Cc: Al Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 71/79] zonefs: switch to new ctime accessors Date: Wed, 21 Jun 2023 10:46:24 -0400 Message-ID: <20230621144735.55953-70-jlayton@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230621144735.55953-1-jlayton@kernel.org> References: <20230621144507.55591-1-jlayton@kernel.org> <20230621144735.55953-1-jlayton@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 In later patches, we're going to change how the ctime.tv_nsec field is utilized. Switch to using accessor functions instead of raw accesses of inode->i_ctime. Signed-off-by: Jeff Layton --- fs/zonefs/super.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c index bbe44a26a8e5..75be0e039ccf 100644 --- a/fs/zonefs/super.c +++ b/fs/zonefs/super.c @@ -658,7 +658,8 @@ static struct inode *zonefs_get_file_inode(struct inode *dir, inode->i_ino = ino; inode->i_mode = z->z_mode; - inode->i_ctime = inode->i_mtime = inode->i_atime = dir->i_ctime; + inode->i_mtime = inode->i_atime = inode_ctime_peek(dir); + inode_ctime_set(inode, inode->i_mtime); inode->i_uid = z->z_uid; inode->i_gid = z->z_gid; inode->i_size = z->z_wpoffset; @@ -694,7 +695,8 @@ static struct inode *zonefs_get_zgroup_inode(struct super_block *sb, inode->i_ino = ino; inode_init_owner(&nop_mnt_idmap, inode, root, S_IFDIR | 0555); inode->i_size = sbi->s_zgroup[ztype].g_nr_zones; - inode->i_ctime = inode->i_mtime = inode->i_atime = root->i_ctime; + inode->i_mtime = inode->i_atime = inode_ctime_peek(root); + inode_ctime_set(inode, inode->i_mtime); inode->i_private = &sbi->s_zgroup[ztype]; set_nlink(inode, 2); @@ -1317,7 +1319,7 @@ static int zonefs_fill_super(struct super_block *sb, void *data, int silent) inode->i_ino = bdev_nr_zones(sb->s_bdev); inode->i_mode = S_IFDIR | 0555; - inode->i_ctime = inode->i_mtime = inode->i_atime = current_time(inode); + inode->i_atime = inode->i_mtime = inode_ctime_set_current(inode); inode->i_op = &zonefs_dir_inode_operations; inode->i_fop = &zonefs_dir_operations; inode->i_size = 2; -- 2.41.0