Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2804953rdb; Wed, 4 Oct 2023 11:57:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IETl91jTe8FuwsUKnUNPfcu4v9z750OUrDvREpvnIYMK64MVeOVuutMIV3N5ycG3K4NP4M8 X-Received: by 2002:a17:90a:1549:b0:278:fe0e:4ffa with SMTP id y9-20020a17090a154900b00278fe0e4ffamr3067665pja.43.1696445854880; Wed, 04 Oct 2023 11:57:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696445854; cv=none; d=google.com; s=arc-20160816; b=QfNrpI/otibscyQdKkks6PJD6saozGLGCBhfiwRmhPcXNjqYe+0Qsp+bm+Y22dROCg UYeM21OZZ5KUaiPb5IPpsJiDrm2/pp0+O0bmftuP9//yNlaRQJnSOa5gkBtnswP/XUWc 1Ky3JzcShgfhzdj08qQeMO8h7e+bdq8RhnSuyAV3QTCy6HzUEdxBzRy36EzUerU/g2B8 2i+MjCZOB/nT9+Co909/j8qQN4YEZA+EVJUFVoiIFy/vqKpxPRXmGQ1X1G1r4HBUT+uJ 0/WQ9QcL5atH0/giSoTatq+WtCjpLRiSpNrJfMcwZRY8n7diF3nS/L9B+a+ShORJLtxl D8iQ== 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:to:from :dkim-signature; bh=yh7MbjssAApSemPFNv6h8bD1OABMzUhRsT0a583gdjE=; fh=c1hve9LK7bidUltaxotdOOkNtWZ8Drk/KOyPdUWU/OI=; b=eY6E674vCccTNnxokPhKwrls314OM/zkPIV+L3FN9m4Qq/OBbIV2DrIlqfDpmvCLoP 0baQxTpJfz5ZtOJLU1Z3LGWAB6Yw4M3YLyX2ZLIiTOOo+rH8BQO+fro8vWlveVfMjx5J BSRtu1Z+4C6PSs5uEUChfTXCKXj+6NI57jfRhxzlQVbLOZRG09pIjEzwXoAeBc0dL2kG 4KvDU0EgNTCwc9WPqfSLw0j4uOKAfBw/OUTyzq5wKSKfvtpq0Gw4J0Z35Y2EONED0G9O 0tfE/bMrhXJiFfQ66SZDZy1Oquk2AD1BToVe+DmEXEkt5ksQb+8xcRxjRSnz2GqtNMzq G3/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="QYo/y4oK"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id mj3-20020a17090b368300b0027749a1fe74si1927226pjb.182.2023.10.04.11.57.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 11:57:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="QYo/y4oK"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id EC7A28071068; Wed, 4 Oct 2023 11:56:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244914AbjJDSzR (ORCPT + 99 others); Wed, 4 Oct 2023 14:55:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244648AbjJDSyh (ORCPT ); Wed, 4 Oct 2023 14:54:37 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E6C8FF; Wed, 4 Oct 2023 11:54:05 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B79AFC433C7; Wed, 4 Oct 2023 18:54:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696445645; bh=dwWfqibgJemP2gjDKO6LNM/P7G5iGswU0cRpE3FsUNg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QYo/y4oKa70cj20ETKx7ox7zliPfuYGoTXTkdkeRKQ1QlZsgpbnQ/InYmQXCdyqss +qeuQDZ5QhVHsWgLMWVOKw0tfyhtZmXTIgeHxPfzmmcK3gIw/wp5LkPw7CvTcHClvG MHSmfyMjkG9I1vbtxsMqqk6Qd3+MA/aXhnsbY6vqS8IWwkCdInO4du5zJLuyGTjEYa RJGj0ltWrjsV0dF6vFtcWye+7rMrGt14EQA/BlDQ8vxT1A+f/BDNuiJ1EJDCacJquR oBIZf4AhPH/KlTfrwMjsZ6FmbvsIXN3xWp2/uub/sgo/GM6WVaLev5Eiza3sCQmfQr 2sEccwCJkjCHA== From: Jeff Layton To: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 17/89] affs: convert to new timestamp accessors Date: Wed, 4 Oct 2023 14:52:02 -0400 Message-ID: <20231004185347.80880-15-jlayton@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231004185347.80880-1-jlayton@kernel.org> References: <20231004185221.80802-1-jlayton@kernel.org> <20231004185347.80880-1-jlayton@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 04 Oct 2023 11:57:00 -0700 (PDT) X-Spam-Level: ** Convert to using the new inode timestamp accessor functions. Signed-off-by: Jeff Layton --- fs/affs/amigaffs.c | 4 ++-- fs/affs/inode.c | 17 +++++++---------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/fs/affs/amigaffs.c b/fs/affs/amigaffs.c index 7ba93efc1143..fd669daa4e7b 100644 --- a/fs/affs/amigaffs.c +++ b/fs/affs/amigaffs.c @@ -60,7 +60,7 @@ affs_insert_hash(struct inode *dir, struct buffer_head *bh) mark_buffer_dirty_inode(dir_bh, dir); affs_brelse(dir_bh); - dir->i_mtime = inode_set_ctime_current(dir); + inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir)); inode_inc_iversion(dir); mark_inode_dirty(dir); @@ -114,7 +114,7 @@ affs_remove_hash(struct inode *dir, struct buffer_head *rem_bh) affs_brelse(bh); - dir->i_mtime = inode_set_ctime_current(dir); + inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir)); inode_inc_iversion(dir); mark_inode_dirty(dir); diff --git a/fs/affs/inode.c b/fs/affs/inode.c index 060746c63151..0210df8d3500 100644 --- a/fs/affs/inode.c +++ b/fs/affs/inode.c @@ -149,13 +149,9 @@ struct inode *affs_iget(struct super_block *sb, unsigned long ino) break; } - inode->i_mtime.tv_sec = inode->i_atime.tv_sec = - inode_set_ctime(inode, - (be32_to_cpu(tail->change.days) * 86400LL + - be32_to_cpu(tail->change.mins) * 60 + - be32_to_cpu(tail->change.ticks) / 50 + AFFS_EPOCH_DELTA) - + sys_tz.tz_minuteswest * 60, 0).tv_sec; - inode->i_mtime.tv_nsec = inode->i_atime.tv_nsec = 0; + inode_set_mtime(inode, + inode_set_atime(inode, inode_set_ctime(inode, (be32_to_cpu(tail->change.days) * 86400LL + be32_to_cpu(tail->change.mins) * 60 + be32_to_cpu(tail->change.ticks) / 50 + AFFS_EPOCH_DELTA) + sys_tz.tz_minuteswest * 60, 0).tv_sec, 0).tv_sec, + 0); affs_brelse(bh); unlock_new_inode(inode); return inode; @@ -187,12 +183,13 @@ affs_write_inode(struct inode *inode, struct writeback_control *wbc) } tail = AFFS_TAIL(sb, bh); if (tail->stype == cpu_to_be32(ST_ROOT)) { - affs_secs_to_datestamp(inode->i_mtime.tv_sec, + affs_secs_to_datestamp(inode_get_mtime_sec(inode), &AFFS_ROOT_TAIL(sb, bh)->root_change); } else { tail->protect = cpu_to_be32(AFFS_I(inode)->i_protect); tail->size = cpu_to_be32(inode->i_size); - affs_secs_to_datestamp(inode->i_mtime.tv_sec, &tail->change); + affs_secs_to_datestamp(inode_get_mtime_sec(inode), + &tail->change); if (!(inode->i_ino == AFFS_SB(sb)->s_root_block)) { uid = i_uid_read(inode); gid = i_gid_read(inode); @@ -314,7 +311,7 @@ affs_new_inode(struct inode *dir) inode->i_gid = current_fsgid(); inode->i_ino = block; set_nlink(inode, 1); - inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode); + simple_inode_init_ts(inode); atomic_set(&AFFS_I(inode)->i_opencnt, 0); AFFS_I(inode)->i_blkcnt = 0; AFFS_I(inode)->i_lc = NULL; -- 2.41.0