lkml.org 
[lkml]   [2023]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v2 30/92] ceph: convert to ctime accessor functions
    From
    Date
    On Thu, 2023-07-06 at 12:53 +0200, Jan Kara wrote:
    > 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>
    >

    Thanks. Fixed in my tree.
    --
    Jeff Layton <jlayton@kernel.org>

    \
     
     \ /
      Last update: 2023-07-06 13:49    [W:2.625 / U:0.244 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site