Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3145685rdh; Thu, 28 Sep 2023 04:14:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGeA3TZtqNd/CJQcfhoDda/1jCgAB/x87+/Fau74HlxS/tkkU2ahsV/geOzp+NARlW1O6ng X-Received: by 2002:a05:6358:2794:b0:135:85ec:a080 with SMTP id l20-20020a056358279400b0013585eca080mr844176rwb.32.1695899652444; Thu, 28 Sep 2023 04:14:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695899652; cv=none; d=google.com; s=arc-20160816; b=M5/WN3Hipjijn82trTYvnoFsCTeaUBRK7S82TjEcgHtSC8V/w/nDiwzzRCzEUExY48 /qravhhnXNVcbCJqFdSmpEPxmAxMzS8Vy032pAoHl4NMoA15sjOE1TH6A/JauzcGQ2B9 hoDuKgYoJwhsX11h4/Uid01jNtrJoQh0XmdosmaROcNdtwO8zN0mDL5mENhZnm4dZ8KY 9FycYqp/dSPfqnsvEFTPN+3hjpbmAaxRB7+LKKc6B2FB+RH7uadhoX/FbfTsGAEnUari FdyDnkWDViQ6GYJ17vo0TQQuLxW+20CR+8RwcdoeMdcFVVibUr4kxT9/XIF0s+z6TvqH WdFQ== 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=g5uTbgo1XfsVA3rVb1XeIC6D7KBKmGgdKhtlV/CUflQ=; fh=c1hve9LK7bidUltaxotdOOkNtWZ8Drk/KOyPdUWU/OI=; b=ynvWZVa3pS+daB9q/QgP1Fsgn7FmngV7/S4VeLrjErCBEmB/NKweeI8DVnERYa7rRP /3tShrxuz6KmkyB2GyybltHqgk+jzaQ7W0rh0GZ+mDHFkf4pmWX+fMc1GFaqj3fQhuNW 1sqb1ZpVKR5MnP1VYtvXzrmPhP7t4IJ6yIvtUU5GgrKkh8PeItBi6P4eZDKEi/NuQVlA G+14FxO2pFcBBz4+orikWcSXkrtfB8MMhywMBILF4NFsgNIadAiGtNMbxDKSE6x9g7to ilgDpk2cOR1lxiCunGmAV4DEN8SdAzr7DbPvczhLJZacbclX4vpgZOQgCpR2ExWxLQWd ypRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="NjH/iogR"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id u7-20020a627907000000b0068a3cb58334si18467576pfc.320.2023.09.28.04.14.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 04:14:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="NjH/iogR"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id C5F51836C03C; Thu, 28 Sep 2023 04:07:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231910AbjI1LFd (ORCPT + 99 others); Thu, 28 Sep 2023 07:05:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232079AbjI1LEe (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 EC7C110D4; Thu, 28 Sep 2023 04:04:30 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 221F3C433C7; Thu, 28 Sep 2023 11:04:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695899070; bh=dL6JaAiMJi3HT7tWmss/Ey0r47z4tWOLj7wgAwDVROw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NjH/iogRYz6SgUaKyOgKzomJjki4Q3y6ASQGKc6mX21XCXB7P0OGSXWQZf69ykW2J 8pF2jpXANCXg6IU/rM9+khNGxHsYu4Xf1+b78EIn5ZOnZVH4hH6v1bwnsir/kKV+f/ zGUEPStlGXC/+hCAeRkLzi3vHTMPQ7eozqG+8/y0SW14KhRMYeZs3Kqd59pGQG3Yit CSkw66RaE9mJwfryyi5e03Iyw+dRLUvQwH/Xlf8P26oy5xWxTtNqLR6uiaEvztJMSc hsKclpLRTonv6fm3zlILBcnjOAACov6zr8YDw6JDAXIRW/e8r700SQiZ+SMSwIRYKQ z92ev2yAnJkhw== From: Jeff Layton To: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 16/87] fs/adfs: convert to new inode {a,m}time accessors Date: Thu, 28 Sep 2023 07:02:25 -0400 Message-ID: <20230928110413.33032-15-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=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.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 (morse.vger.email [0.0.0.0]); Thu, 28 Sep 2023 04:07:14 -0700 (PDT) Signed-off-by: Jeff Layton --- fs/adfs/inode.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/fs/adfs/inode.c b/fs/adfs/inode.c index 20963002578a..3081edb09e46 100644 --- a/fs/adfs/inode.c +++ b/fs/adfs/inode.c @@ -242,6 +242,7 @@ struct inode * adfs_iget(struct super_block *sb, struct object_info *obj) { struct inode *inode; + struct timespec64 ts; inode = new_inode(sb); if (!inode) @@ -268,9 +269,10 @@ adfs_iget(struct super_block *sb, struct object_info *obj) ADFS_I(inode)->attr = obj->attr; inode->i_mode = adfs_atts2mode(sb, inode); - adfs_adfs2unix_time(&inode->i_mtime, inode); - inode->i_atime = inode->i_mtime; - inode_set_ctime_to_ts(inode, inode->i_mtime); + adfs_adfs2unix_time(&ts, inode); + inode_set_atime_to_ts(inode, ts); + inode_set_mtime_to_ts(inode, ts); + inode_set_ctime_to_ts(inode, ts); if (S_ISDIR(inode->i_mode)) { inode->i_op = &adfs_dir_inode_operations; @@ -321,7 +323,8 @@ adfs_notify_change(struct mnt_idmap *idmap, struct dentry *dentry, if (ia_valid & ATTR_MTIME && adfs_inode_is_stamped(inode)) { adfs_unix2adfs_time(inode, &attr->ia_mtime); - adfs_adfs2unix_time(&inode->i_mtime, inode); + adfs_adfs2unix_time(&attr->ia_mtime, inode); + inode_set_mtime_to_ts(inode, attr->ia_mtime); } /* @@ -329,7 +332,7 @@ adfs_notify_change(struct mnt_idmap *idmap, struct dentry *dentry, * have the ability to represent them in our filesystem? */ if (ia_valid & ATTR_ATIME) - inode->i_atime = attr->ia_atime; + inode_set_atime_to_ts(inode, attr->ia_atime); if (ia_valid & ATTR_CTIME) inode_set_ctime_to_ts(inode, attr->ia_ctime); if (ia_valid & ATTR_MODE) { -- 2.41.0