From mboxrd@z Thu Jan 1 00:00:00 1970 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 42DDDEB64D9 for ; Thu, 6 Jul 2023 14:00:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232739AbjGFOA2 (ORCPT ); Thu, 6 Jul 2023 10:00:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230443AbjGFOAX (ORCPT ); Thu, 6 Jul 2023 10:00:23 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E44D01727; Thu, 6 Jul 2023 07:00:22 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 8C69D1F747; Thu, 6 Jul 2023 14:00:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1688652021; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BSxUZqWAC97BDuH24amqSJRte8kZK1MAwi56dgvAK3A=; b=CkKgGyY5s9NLWYfUmhHVHLQWUTIcTmfKzHvQ1MAsLKANYwqN1ulYOmxWe1PiK4tEhQ09ow h1wWmAi+HX864MhRWP04uCbMLcRTGni7Any7iLi9lPhAK3dg+z7rtVUA1yiI5Cj3svTKAh xcWvAx+sf5InB5lFtfPxUv6fBZB4QV0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1688652021; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BSxUZqWAC97BDuH24amqSJRte8kZK1MAwi56dgvAK3A=; b=w2fAfmS+0h9mEjYhv6hRxYRsoyYqPeQeKa8hOtLPzDCPMuEiDCSmq+8vBrO2ARJBDAuC60 N1n0S63QYtiueyCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 7C62D138EE; Thu, 6 Jul 2023 14:00:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id gfZbHvXIpmSIZwAAMHmgww (envelope-from ); Thu, 06 Jul 2023 14:00:21 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id E484EA0707; Thu, 6 Jul 2023 16:00:20 +0200 (CEST) Date: Thu, 6 Jul 2023 16:00:20 +0200 From: Jan Kara To: Jeff Layton Cc: Christian Brauner , Kees Cook , Tony Luck , "Guilherme G. Piccoli" , Al Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH v2 68/92] pstore: convert to ctime accessor functions Message-ID: <20230706140020.232uhwgyiapv6zly@quack3> References: <20230705185755.579053-1-jlayton@kernel.org> <20230705190309.579783-1-jlayton@kernel.org> <20230705190309.579783-66-jlayton@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230705190309.579783-66-jlayton@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 05-07-23 15:01:33, Jeff Layton wrote: > In later patches, we're going to change how the inode's ctime field is > used. Switch to using accessor functions instead of raw accesses of > inode->i_ctime. > > Acked-by: Kees Cook > Signed-off-by: Jeff Layton Looks good to me. Feel free to add: Reviewed-by: Jan Kara Honza > --- > fs/pstore/inode.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c > index ffbadb8b3032..a756af980d0c 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->i_ctime = current_time(inode); > + inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode); > } > return inode; > } > @@ -390,7 +390,7 @@ int pstore_mkfile(struct dentry *root, struct pstore_record *record) > inode->i_private = private; > > if (record->time.tv_sec) > - inode->i_mtime = inode->i_ctime = record->time; > + inode->i_mtime = inode_set_ctime_to_ts(inode, record->time); > > d_add(dentry, inode); > > -- > 2.41.0 > -- Jan Kara SUSE Labs, CR