From patchwork Wed Jul 5 19:01:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13302843 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 2CAFFC001DD for ; Wed, 5 Jul 2023 19:11:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234164AbjGETLH (ORCPT ); Wed, 5 Jul 2023 15:11:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234110AbjGETKe (ORCPT ); Wed, 5 Jul 2023 15:10:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49EC5420A; Wed, 5 Jul 2023 12:05:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 40CB56171C; Wed, 5 Jul 2023 19:05:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2375C433C7; Wed, 5 Jul 2023 19:05:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688583948; bh=h+YjMsn4Qu+tNMhA5V9icLWH3DAN1ha4KPOWk0eHFlw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BfI2JsznIuKtZGtFSEhKOPI06bCrFYexEv6QgKLLavNRCiNqPZ2fCXh5YMZ3+qk6z uHYKtQrOAtE1+9yqspAq/SkmWtS8Chv2RrzTpqMZtI+ZfQb6mqfUu4DBh/Uk+kQf6M WTTV67y1Nq1a+vJbkVT6313ICRCjcJlVO3XrdnKVEyNxJNT43Ze1phh/FWKkKqYyrO wWi3b4B2v6gc0Abd122oA7HKFFfpLL/nUvNvcMjcJ14iaudOj2eod8SdimXSUHHX2B 6K1v3jCGj/D+qUnYwXWZNpeAVJozPL+dzknN4Hp8nb0PLYA4zgWz1nHWhhNx+p0E2U ERz+czJ3zy1+g== From: Jeff Layton To: Christian Brauner , Paul Moore , Stephen Smalley , Eric Paris Cc: Al Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, selinux@vger.kernel.org Subject: [PATCH v2 91/92] selinux: convert to ctime accessor functions Date: Wed, 5 Jul 2023 15:01:56 -0400 Message-ID: <20230705190309.579783-89-jlayton@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230705190309.579783-1-jlayton@kernel.org> References: <20230705185755.579053-1-jlayton@kernel.org> <20230705190309.579783-1-jlayton@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: selinux@vger.kernel.org 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: Paul Moore Signed-off-by: Jeff Layton Reviewed-by: Jan Kara --- security/selinux/selinuxfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index bad1f6b685fd..9dafb6ff110d 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c @@ -1197,7 +1197,7 @@ static struct inode *sel_make_inode(struct super_block *sb, int mode) if (ret) { ret->i_mode = mode; - ret->i_atime = ret->i_mtime = ret->i_ctime = current_time(ret); + ret->i_atime = ret->i_mtime = inode_set_ctime_current(ret); } return ret; }