Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3148781rdh; Thu, 28 Sep 2023 04:19:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG5rn8Flrlo2I6mhWUxjWaPM3Mkyvs9M9DI6MjY62n2uy49QY2cMqJJkLnhUj3ZkdJ8ye+F X-Received: by 2002:a05:6358:339e:b0:145:6e16:fa8f with SMTP id i30-20020a056358339e00b001456e16fa8fmr974379rwd.13.1695899979240; Thu, 28 Sep 2023 04:19:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695899979; cv=none; d=google.com; s=arc-20160816; b=F0hKM1e2gbaSHlxuKIKGGme9Yh34P3ohb+1tcX1RJL3UjfyrzrCuEBY/XfpsRc221u Pp/LtfE7eycYMqagu1jzF+TcajbcDEnUX1zucy625UDC9S9DlONhuPtQDMERHNDxNnBn Xplq6CFDHTz+DadhJUVZCFuRac1D73z5S3yB6RRvNNKQ21OJJty96OrV8X2XnCk7JJOE Y4/HUVdawCR2ro+sz8T3uEiJ1Oe7tMDA5AznCHNclgqXuVVS0nssSGnJ5zOUHPBMZLjc 1tP5bulrH1tjyPtIUb8XjEyopWL+BLgA+izS7tDSnZ/N/yQxaDNIqLdvWuR4ZhGU0mtZ bEsw== 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=TvrF68eVZWomZOGHHkAaqhEEI4B7QjuLYW7ApSyeePQ=; fh=c1hve9LK7bidUltaxotdOOkNtWZ8Drk/KOyPdUWU/OI=; b=Ny+TSjIzTeH5pd3zt4rMOOoPL5ayq3IAFdg9cLLhoHXQ1lKcum8Jgy5KEncMHyTXv8 vs3gHCyugz+R3nOkAFM8kcmQ7yP9Q+bXUYKzzzFCRMvALO/6sQrzZpxPQqZeUheWBuAv 3IlVgMpJSeME3qFgjHYN4zjBPP1fHTzV7psXbXYkglGCwmE804tbtiCXZ674QvkVgRq5 UAM6WtFOglt7r6JV7gUp/uIYUuCoADdoAVkInCJ2JBe2m2gUUqQ9zX4OynnFlkgAscSD 47mqyEubv+YZCZhsl/uBgCXAYuZZ+r9bCmIs9GvwB/ankD63f6C2+cP1p4ASfXHsw8YC Klwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RRpyQs9C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id 36-20020a631564000000b00565617189e2si18521812pgv.839.2023.09.28.04.19.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 04:19:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RRpyQs9C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id CD058853466A; Thu, 28 Sep 2023 04:05:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231964AbjI1LFf (ORCPT + 99 others); Thu, 28 Sep 2023 07:05:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232080AbjI1LEe (ORCPT ); Thu, 28 Sep 2023 07:04:34 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F33C41A6; Thu, 28 Sep 2023 04:04:31 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 333C9C433CA; Thu, 28 Sep 2023 11:04:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695899071; bh=MQbRQV1pMyXoxMI32Jaeh4uSSWTp46z3JlKjNlrpA8E=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RRpyQs9CXb5e0HIifUYeN4lpcynjLHWwCeXho3hyPphN9ud17Aw2+d8dBj2AgQZtg klXJ/li8hoho1bYLvxRehgir7nnSvErI7k7CZ2EY7ycAgaNHQxprEK5lC+fo91YDV1 PcIt2ZwO1tfDV4GABXM57si8BWobmzqUs8qF0PkGlZQJ3rnlp6oP4LyLy+6WGDFglp LIBddSDDeTvxavtPQi1+Oc78XJio1cWXoFfVSVKWfTGpTqw0qQT0XR9rKCM/5GdfZQ eeQYYaeUXIBxzxY7+9Zpevc5DzBDtqJBm2p0vTEKohyGu9TOI62lOjATZ5HulCRtAR k5LMoq1/VtoGg== From: Jeff Layton To: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 17/87] fs/affs: convert to new inode {a,m}time accessors Date: Thu, 28 Sep 2023 07:02:26 -0400 Message-ID: <20230928110413.33032-16-jlayton@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230928110413.33032-1-jlayton@kernel.org> References: <20230928110300.32891-1-jlayton@kernel.org> <20230928110413.33032-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 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 28 Sep 2023 04:05:49 -0700 (PDT) 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..95df8ce32d3a 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(inode).tv_sec, &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(inode).tv_sec, + &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