Re: [PATCH v2 39/92] erofs: convert to ctime accessor functions

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

 



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

Just one nit below:

> @@ -176,10 +175,10 @@ static void *erofs_read_inode(struct erofs_buf *buf,
>  		vi->chunkbits = sb->s_blocksize_bits +
>  			(vi->chunkformat & EROFS_CHUNK_FORMAT_BLKBITS_MASK);
>  	}
> -	inode->i_mtime.tv_sec = inode->i_ctime.tv_sec;
> -	inode->i_atime.tv_sec = inode->i_ctime.tv_sec;
> -	inode->i_mtime.tv_nsec = inode->i_ctime.tv_nsec;
> -	inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec;
> +	inode->i_mtime.tv_sec = inode_get_ctime(inode).tv_sec;
> +	inode->i_atime.tv_sec = inode_get_ctime(inode).tv_sec;
> +	inode->i_mtime.tv_nsec = inode_get_ctime(inode).tv_nsec;
> +	inode->i_atime.tv_nsec = inode_get_ctime(inode).tv_nsec;

Isn't this just longer way to write:

	inode->i_atime = inode->i_mtime = inode_get_ctime(inode);

?

								Honza
-- 
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