Re: [PATCH v2 30/92] ceph: convert to ctime accessor functions

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

 



On Wed 05-07-23 15:00:55, 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: Xiubo Li <xiubli@xxxxxxxxxx>
> Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>

Just one nit below:

> @@ -688,6 +688,7 @@ void ceph_fill_file_time(struct inode *inode, int issued,
>  			 struct timespec64 *mtime, struct timespec64 *atime)
>  {
>  	struct ceph_inode_info *ci = ceph_inode(inode);
> +	struct timespec64 ictime = inode_get_ctime(inode);
>  	int warn = 0;
>  
>  	if (issued & (CEPH_CAP_FILE_EXCL|
> @@ -696,11 +697,12 @@ void ceph_fill_file_time(struct inode *inode, int issued,
>  		      CEPH_CAP_AUTH_EXCL|
>  		      CEPH_CAP_XATTR_EXCL)) {
>  		if (ci->i_version == 0 ||
> -		    timespec64_compare(ctime, &inode->i_ctime) > 0) {
> +		    timespec64_compare(ctime, &ictime) > 0) {
>  			dout("ctime %lld.%09ld -> %lld.%09ld inc w/ cap\n",
> -			     inode->i_ctime.tv_sec, inode->i_ctime.tv_nsec,
> +			     inode_get_ctime(inode).tv_sec,
> +			     inode_get_ctime(inode).tv_nsec,

I think here you can use ictime instead of inode_get_ctime(inode).
Otherwise feel free to add:

Reviewed-by: Jan Kara <jack@xxxxxxx>



								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