SELinux Security Module development
 help / color / mirror / Atom feed
* [PATCH v2 91/92] selinux: convert to ctime accessor functions
       [not found] ` <20230705190309.579783-1-jlayton@kernel.org>
@ 2023-07-05 19:01   ` Jeff Layton
  2023-07-06 14:57     ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Layton @ 2023-07-05 19:01 UTC (permalink / raw)
  To: Christian Brauner, Paul Moore, Stephen Smalley, Eric Paris
  Cc: Al Viro, Jan Kara, linux-fsdevel, linux-kernel, selinux

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 <paul@paul-moore.com>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 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;
 }
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 91/92] selinux: convert to ctime accessor functions
  2023-07-05 19:01   ` [PATCH v2 91/92] selinux: convert to ctime accessor functions Jeff Layton
@ 2023-07-06 14:57     ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2023-07-06 14:57 UTC (permalink / raw)
  To: Jeff Layton
  Cc: Christian Brauner, Paul Moore, Stephen Smalley, Eric Paris,
	Al Viro, Jan Kara, linux-fsdevel, linux-kernel, selinux

On Wed 05-07-23 15:01:56, 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: Paul Moore <paul@paul-moore.com>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  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;
>  }
> -- 
> 2.41.0
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-06 14:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230705185755.579053-1-jlayton@kernel.org>
     [not found] ` <20230705190309.579783-1-jlayton@kernel.org>
2023-07-05 19:01   ` [PATCH v2 91/92] selinux: convert to ctime accessor functions Jeff Layton
2023-07-06 14:57     ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox