[83/87] security/selinux: convert to new inode {a,m}time accessors

Message ID 20230928110413.33032-82-jlayton@kernel.org
State New
Headers
Series fs: new accessor methods for atime and mtime |

Commit Message

Jeff Layton Sept. 28, 2023, 11:03 a.m. UTC
  Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 security/selinux/selinuxfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Paul Moore Oct. 3, 2023, 7:53 p.m. UTC | #1
On Thu, Sep 28, 2023 at 7:23 AM Jeff Layton <jlayton@kernel.org> wrote:
>
> Signed-off-by: Jeff Layton <jlayton@kernel.org>
> ---
>  security/selinux/selinuxfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Paul Moore <paul@paul-moore.com>

> diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
> index 6fa640263216..6c596ae7fef9 100644
> --- a/security/selinux/selinuxfs.c
> +++ b/security/selinux/selinuxfs.c
> @@ -1198,7 +1198,7 @@ static struct inode *sel_make_inode(struct super_block *sb, umode_t mode)
>
>         if (ret) {
>                 ret->i_mode = mode;
> -               ret->i_atime = ret->i_mtime = inode_set_ctime_current(ret);
> +               simple_inode_init_ts(ret);
>         }
>         return ret;
>  }
> --
> 2.41.0
  

Patch

diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index 6fa640263216..6c596ae7fef9 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -1198,7 +1198,7 @@  static struct inode *sel_make_inode(struct super_block *sb, umode_t mode)
 
 	if (ret) {
 		ret->i_mode = mode;
-		ret->i_atime = ret->i_mtime = inode_set_ctime_current(ret);
+		simple_inode_init_ts(ret);
 	}
 	return ret;
 }