From patchwork Thu Sep 28 11:03:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13402712 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 F0502E732C4 for ; Thu, 28 Sep 2023 11:09:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232315AbjI1LJj (ORCPT ); Thu, 28 Sep 2023 07:09:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232317AbjI1LI5 (ORCPT ); Thu, 28 Sep 2023 07:08:57 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C33021FFA; Thu, 28 Sep 2023 04:05:26 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DCA6DC433C7; Thu, 28 Sep 2023 11:05:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695899126; bh=Ss7nLMp7jLyE6miSYsprdXK+tzY89Wa3eXUpvyW77Ug=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GB2bi8+hguQ/MH1kAXUuU1IWliWyqT+gj6ORqRdaqWx//xKgrh1/giZmmtA0PgxlV rCEHfaQ13m8Us+1ADvEN2ugG/nb4keyAFRhGOm8yKDERmEeTsYGpKW0iWqBcVYtpzx krqs7C229KDYWJBITkNxFK6MQepOt2qb1WwCSbwl5WuLVo2d2dBUoC3xqX+7WG+pyz H8jUEK3UgzBkIVDoCUuUYqpNu6hqefcY/Uztmbu/pzphpYJtazLsEiWG5IOvsND2rX YglEz/g6FYTpmXddC01mx+F9+X+DITp17pceumXx3RkrGO17iP3ezLmJMG5F2SBnCM NhjlPxSnCmeRg== From: Jeff Layton To: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Tony Luck , "Guilherme G. Piccoli" , linux-hardening@vger.kernel.org Subject: [PATCH 61/87] fs/pstore: convert to new inode {a,m}time accessors Date: Thu, 28 Sep 2023 07:03:10 -0400 Message-ID: <20230928110413.33032-60-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/pstore/inode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c index 585360706b33..d41c20d1b5e8 100644 --- a/fs/pstore/inode.c +++ b/fs/pstore/inode.c @@ -223,7 +223,7 @@ static struct inode *pstore_get_inode(struct super_block *sb) struct inode *inode = new_inode(sb); if (inode) { inode->i_ino = get_next_ino(); - inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode); + simple_inode_init_ts(inode); } return inode; } @@ -390,7 +390,8 @@ int pstore_mkfile(struct dentry *root, struct pstore_record *record) inode->i_private = private; if (record->time.tv_sec) - inode->i_mtime = inode_set_ctime_to_ts(inode, record->time); + inode_set_mtime_to_ts(inode, + inode_set_ctime_to_ts(inode, record->time)); d_add(dentry, inode);