2023-07-05 19:15:19

by Jeffrey Layton

[permalink] [raw]
Subject: [PATCH v2 16/92] s390: convert to ctime accessor functions

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.

Reviewed-by: Jan Kara <[email protected]>
Signed-off-by: Jeff Layton <[email protected]>
---
arch/s390/hypfs/inode.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c
index ee919bfc8186..5feef8da406b 100644
--- a/arch/s390/hypfs/inode.c
+++ b/arch/s390/hypfs/inode.c
@@ -53,7 +53,7 @@ static void hypfs_update_update(struct super_block *sb)
struct inode *inode = d_inode(sb_info->update_file);

sb_info->last_update = ktime_get_seconds();
- inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
+ inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode);
}

/* directory tree removal functions */
@@ -101,7 +101,7 @@ static struct inode *hypfs_make_inode(struct super_block *sb, umode_t mode)
ret->i_mode = mode;
ret->i_uid = hypfs_info->uid;
ret->i_gid = hypfs_info->gid;
- ret->i_atime = ret->i_mtime = ret->i_ctime = current_time(ret);
+ ret->i_atime = ret->i_mtime = inode_set_ctime_current(ret);
if (S_ISDIR(mode))
set_nlink(ret, 2);
}
--
2.41.0



2023-07-12 13:04:52

by Alexander Gordeev

[permalink] [raw]
Subject: Re: [PATCH v2 16/92] s390: convert to ctime accessor functions

On Wed, Jul 05, 2023 at 03:00:41PM -0400, 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.
>
> Reviewed-by: Jan Kara <[email protected]>
> Signed-off-by: Jeff Layton <[email protected]>
> ---
> arch/s390/hypfs/inode.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c
> index ee919bfc8186..5feef8da406b 100644
> --- a/arch/s390/hypfs/inode.c
> +++ b/arch/s390/hypfs/inode.c
> @@ -53,7 +53,7 @@ static void hypfs_update_update(struct super_block *sb)
> struct inode *inode = d_inode(sb_info->update_file);
>
> sb_info->last_update = ktime_get_seconds();
> - inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
> + inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode);
> }
>
> /* directory tree removal functions */
> @@ -101,7 +101,7 @@ static struct inode *hypfs_make_inode(struct super_block *sb, umode_t mode)
> ret->i_mode = mode;
> ret->i_uid = hypfs_info->uid;
> ret->i_gid = hypfs_info->gid;
> - ret->i_atime = ret->i_mtime = ret->i_ctime = current_time(ret);
> + ret->i_atime = ret->i_mtime = inode_set_ctime_current(ret);
> if (S_ISDIR(mode))
> set_nlink(ret, 2);
> }

Acked-by: Alexander Gordeev <[email protected]>