On Thu, 2023-07-06 at 15:58 +0200, Jan Kara wrote: > On Wed 05-07-23 15:01:31, 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: Amir Goldstein <amir73il@xxxxxxxxx> > > Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx> > ... > > diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c > > index 21245b00722a..7acd3e3fe790 100644 > > --- a/fs/overlayfs/file.c > > +++ b/fs/overlayfs/file.c > ... > > @@ -249,10 +250,12 @@ static void ovl_file_accessed(struct file *file) > > if (!upperinode) > > return; > > > > + ctime = inode_get_ctime(inode); > > + uctime = inode_get_ctime(upperinode); > > if ((!timespec64_equal(&inode->i_mtime, &upperinode->i_mtime) || > > - !timespec64_equal(&inode->i_ctime, &upperinode->i_ctime))) { > > + !timespec64_equal(&ctime, &uctime))) { > > inode->i_mtime = upperinode->i_mtime; > > - inode->i_ctime = upperinode->i_ctime; > > + inode_set_ctime_to_ts(inode, inode_get_ctime(upperinode)); > > I think you can use uctime here instead of inode_get_ctime(upperinode)? > Otherwise the patch looks good. Feel free to add: > > Reviewed-by: Jan Kara <jack@xxxxxxx> > Thanks, fixed in tree. -- Jeff Layton <jlayton@xxxxxxxxxx>