Re: [PATCH v2 64/92] openpromfs: convert to ctime accessor functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed 05-07-23 15:01:29, 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.
> 
> Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@xxxxxxx>

								Honza

> ---
>  fs/openpromfs/inode.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/fs/openpromfs/inode.c b/fs/openpromfs/inode.c
> index f0b7f4d51a17..b2457cb97fa0 100644
> --- a/fs/openpromfs/inode.c
> +++ b/fs/openpromfs/inode.c
> @@ -237,7 +237,7 @@ static struct dentry *openpromfs_lookup(struct inode *dir, struct dentry *dentry
>  	if (IS_ERR(inode))
>  		return ERR_CAST(inode);
>  	if (inode->i_state & I_NEW) {
> -		inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
> +		inode->i_mtime = inode->i_atime = inode_set_ctime_current(inode);
>  		ent_oi = OP_I(inode);
>  		ent_oi->type = ent_type;
>  		ent_oi->u = ent_data;
> @@ -387,8 +387,7 @@ static int openprom_fill_super(struct super_block *s, struct fs_context *fc)
>  		goto out_no_root;
>  	}
>  
> -	root_inode->i_mtime = root_inode->i_atime =
> -		root_inode->i_ctime = current_time(root_inode);
> +	root_inode->i_mtime = root_inode->i_atime = inode_set_ctime_current(root_inode);
>  	root_inode->i_op = &openprom_inode_operations;
>  	root_inode->i_fop = &openprom_operations;
>  	root_inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO;
> -- 
> 2.41.0
> 
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux