| Date | Thu, 6 Jul 2023 12:53:45 +0200 | From | Jan Kara <> | Subject | Re: [PATCH v2 30/92] ceph: convert to ctime accessor functions |
| |
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@redhat.com> > Signed-off-by: Jeff Layton <jlayton@kernel.org>
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@suse.cz>
Honza
-- Jan Kara <jack@suse.com> SUSE Labs, CR
|