From patchwork Thu Sep 28 11:03:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13402642 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 DCBDDE732C0 for ; Thu, 28 Sep 2023 11:09:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232199AbjI1LJJ (ORCPT ); Thu, 28 Sep 2023 07:09:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232373AbjI1LIA (ORCPT ); Thu, 28 Sep 2023 07:08:00 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 554781BF4; Thu, 28 Sep 2023 04:05:20 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3215AC433CD; Thu, 28 Sep 2023 11:05:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695899120; bh=DJSvCuPLAD4saV0xZe/l++49VBU2Ao4YBQp420d7aJ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X1p1tnqkywMXIK15zqJ2FgVjNGn7haElYKat55LiJsKAEX44aY9LJroHbA3VzKLGj /Y6rWU8/2CJidpL3EcXTC6Xu8+XrH/os0C2pOlhFNunuxtBiyODoe7HJX3GtJyWhzc ikSi7r3w2rNWPJS/8i6BgDOuAFW7BZ/AsmifvnSK7N1Ju0zyi191rT03uuSHoRuV6x Ug/dMhpw4MIlS9jrAGXCpgZhzqNmGrGaqyuG8uTeiHP1xw2JK5iohcnV73NUzY11xd A2bzjwLLv+A5lAtZRymkX5iLwUrdcnw9wGxHtX4+Iix6HcvBC2Q8qKuiiVE7JG21Q+ dh/X0w7/3+u7Q== From: Jeff Layton To: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: linux-karma-devel@lists.sourceforge.net Subject: [PATCH 56/87] fs/omfs: convert to new inode {a,m}time accessors Date: Thu, 28 Sep 2023 07:03:05 -0400 Message-ID: <20230928110413.33032-55-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/omfs/inode.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/fs/omfs/inode.c b/fs/omfs/inode.c index 2f8c1882f45c..cdcee7af34d1 100644 --- a/fs/omfs/inode.c +++ b/fs/omfs/inode.c @@ -51,7 +51,7 @@ struct inode *omfs_new_inode(struct inode *dir, umode_t mode) inode_init_owner(&nop_mnt_idmap, inode, NULL, mode); inode->i_mapping->a_ops = &omfs_aops; - inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode); + simple_inode_init_ts(inode); switch (mode & S_IFMT) { case S_IFDIR: inode->i_op = &omfs_dir_inops; @@ -230,11 +230,9 @@ struct inode *omfs_iget(struct super_block *sb, ino_t ino) ctime = be64_to_cpu(oi->i_ctime); nsecs = do_div(ctime, 1000) * 1000L; - inode->i_atime.tv_sec = ctime; - inode->i_mtime.tv_sec = ctime; + inode_set_atime(inode, ctime, nsecs); + inode_set_mtime(inode, ctime, nsecs); inode_set_ctime(inode, ctime, nsecs); - inode->i_atime.tv_nsec = nsecs; - inode->i_mtime.tv_nsec = nsecs; inode->i_mapping->a_ops = &omfs_aops;