[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b1cc6c70a42bf41d023eea9f11ff0aaea10a56c3.camel@kernel.org>
Date: Thu, 06 Jul 2023 07:53:01 -0400
From: Jeff Layton <jlayton@...nel.org>
To: Jan Kara <jack@...e.cz>
Cc: Christian Brauner <brauner@...nel.org>,
Gao Xiang <xiang@...nel.org>, Chao Yu <chao@...nel.org>,
Yue Hu <huyue2@...lpad.com>,
Jeffle Xu <jefflexu@...ux.alibaba.com>,
Al Viro <viro@...iv.linux.org.uk>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-erofs@...ts.ozlabs.org
Subject: Re: [PATCH v2 39/92] erofs: convert to ctime accessor functions
On Thu, 2023-07-06 at 13:00 +0200, Jan Kara wrote:
> 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@...nel.org>
> > Signed-off-by: Jeff Layton <jlayton@...nel.org>
>
> 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
Yes. Chalk that one up to coccinelle. Fixed in my tree.
--
Jeff Layton <jlayton@...nel.org>
Powered by blists - more mailing lists