linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Christian Brauner <brauner@kernel.org>,
	Paul Moore <paul@paul-moore.com>,
	James Morris <jmorris@namei.org>,
	"Serge E. Hallyn" <serge@hallyn.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>, Jan Kara <jack@suse.cz>,
	linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 77/79] security: switch to new ctime accessors
Date: Wed, 21 Jun 2023 10:46:30 -0400	[thread overview]
Message-ID: <20230621144735.55953-76-jlayton@kernel.org> (raw)
In-Reply-To: <20230621144735.55953-1-jlayton@kernel.org>

In later patches, we're going to change how the ctime.tv_nsec field is
utilized. Switch to using accessor functions instead of raw accesses of
inode->i_ctime.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 security/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/inode.c b/security/inode.c
index 6c326939750d..086280390793 100644
--- a/security/inode.c
+++ b/security/inode.c
@@ -145,7 +145,7 @@ static struct dentry *securityfs_create_dentry(const char *name, umode_t mode,
 
 	inode->i_ino = get_next_ino();
 	inode->i_mode = mode;
-	inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
+	inode->i_atime = inode->i_mtime = inode_ctime_set_current(inode);
 	inode->i_private = data;
 	if (S_ISDIR(mode)) {
 		inode->i_op = &simple_dir_inode_operations;
-- 
2.41.0


  parent reply	other threads:[~2023-06-21 14:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230621144507.55591-1-jlayton@kernel.org>
     [not found] ` <20230621144735.55953-1-jlayton@kernel.org>
2023-06-21 14:46   ` [PATCH 76/79] apparmor: switch to new ctime accessors Jeff Layton
2023-06-22  9:04     ` John Johansen
2023-06-21 14:46   ` Jeff Layton [this message]
2023-06-23 14:15     ` [PATCH 77/79] security: " Paul Moore
     [not found] ` <20230621152141.5961cf5f@gandalf.local.home>
     [not found]   ` <2a5a069572b46b59dd16fe8d54e549a9b5bbb6eb.camel@kernel.org>
2023-06-23 12:41     ` [PATCH 00/79] fs: new accessors for inode->i_ctime Christian Brauner
2023-06-30 22:11   ` Luis Chamberlain
     [not found] ` <20230621144507.55591-2-jlayton@kernel.org>
     [not found]   ` <99b3c749-23d9-6f09-fb75-6a84f3d1b066@kernel.org>
2023-06-22 10:14     ` [PATCH 01/79] fs: add ctime accessors infrastructure Jeff Layton
2023-06-30 22:12   ` Luis Chamberlain
2023-07-12 15:31   ` Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230621144735.55953-76-jlayton@kernel.org \
    --to=jlayton@kernel.org \
    --cc=brauner@kernel.org \
    --cc=jack@suse.cz \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=serge@hallyn.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).