From patchwork Thu Sep 28 11:03:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13402645 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9424CE732C3 for ; Thu, 28 Sep 2023 11:09:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232468AbjI1LJU (ORCPT ); Thu, 28 Sep 2023 07:09:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232470AbjI1LIV (ORCPT ); Thu, 28 Sep 2023 07:08:21 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A4FB1FCA; Thu, 28 Sep 2023 04:05:23 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3ABD1C433CC; Thu, 28 Sep 2023 11:05:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695899122; bh=E6oS2zOcODx/9WfXsAOvYmFNqLdc+m+M1LwLfi/Jt9w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P9RRTyXzrby0QpT7bxb6Q+L2KH2Wt1LYsrklfbCXM31yTwGk4+yO3ool/4uYXlmkL kZ1+zSUhnVhVphEdQC8MsWU22GfTyKcOuhmvXrXl/lWJQe355gRT15ACsAX8AWdoXi oWfLD2nlBQmMdQbPzH6rT6m8kRl5WxrAVskPnmPRgBHCZ2AQWLSY3Zcp1UxZVMEbSr wn5DK3zVACsKuciCtAFZ1nX9fVFFPPbAAZTYPyYdVE2BH+IsNSY7e77tB0yMIS+RZs b1wyYEgQi67n2DZV55HTat2f7SjaxjulRVLmOFkGvyfl0JYLxOJgXk6dQram9j1YpL MhCX38+Bd/vcA== From: Jeff Layton To: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Martin Brandenburg , devel@lists.orangefs.org Subject: [PATCH 58/87] fs/orangefs: convert to new inode {a,m}time accessors Date: Thu, 28 Sep 2023 07:03:07 -0400 Message-ID: <20230928110413.33032-57-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 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Signed-off-by: Jeff Layton --- fs/orangefs/orangefs-utils.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fs/orangefs/orangefs-utils.c b/fs/orangefs/orangefs-utils.c index 0a9fcfdf552f..42cb8517cebe 100644 --- a/fs/orangefs/orangefs-utils.c +++ b/fs/orangefs/orangefs-utils.c @@ -155,14 +155,14 @@ static inline void copy_attributes_from_inode(struct inode *inode, if (orangefs_inode->attr_valid & ATTR_ATIME) { attrs->mask |= ORANGEFS_ATTR_SYS_ATIME; if (orangefs_inode->attr_valid & ATTR_ATIME_SET) { - attrs->atime = (time64_t)inode->i_atime.tv_sec; + attrs->atime = (time64_t) inode_get_atime(inode).tv_sec; attrs->mask |= ORANGEFS_ATTR_SYS_ATIME_SET; } } if (orangefs_inode->attr_valid & ATTR_MTIME) { attrs->mask |= ORANGEFS_ATTR_SYS_MTIME; if (orangefs_inode->attr_valid & ATTR_MTIME_SET) { - attrs->mtime = (time64_t)inode->i_mtime.tv_sec; + attrs->mtime = (time64_t) inode_get_mtime(inode).tv_sec; attrs->mask |= ORANGEFS_ATTR_SYS_MTIME_SET; } } @@ -357,15 +357,15 @@ int orangefs_inode_getattr(struct inode *inode, int flags) downcall.resp.getattr.attributes.owner); inode->i_gid = make_kgid(&init_user_ns, new_op-> downcall.resp.getattr.attributes.group); - inode->i_atime.tv_sec = (time64_t)new_op-> - downcall.resp.getattr.attributes.atime; - inode->i_mtime.tv_sec = (time64_t)new_op-> - downcall.resp.getattr.attributes.mtime; + inode_set_atime(inode, + (time64_t)new_op->downcall.resp.getattr.attributes.atime, + 0); + inode_set_mtime(inode, + (time64_t)new_op->downcall.resp.getattr.attributes.mtime, + 0); inode_set_ctime(inode, (time64_t)new_op->downcall.resp.getattr.attributes.ctime, 0); - inode->i_atime.tv_nsec = 0; - inode->i_mtime.tv_nsec = 0; /* special case: mark the root inode as sticky */ inode->i_mode = type | (is_root_handle(inode) ? S_ISVTX : 0) |