[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8c7efbb0d8b79bd559795e5a29d18c76937f013b.camel@kernel.org>
Date: Thu, 06 Jul 2023 10:01:38 -0400
From: Jeff Layton <jlayton@...nel.org>
To: Jan Kara <jack@...e.cz>
Cc: Christian Brauner <brauner@...nel.org>,
Miklos Szeredi <miklos@...redi.hu>,
Amir Goldstein <amir73il@...il.com>,
Al Viro <viro@...iv.linux.org.uk>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-unionfs@...r.kernel.org
Subject: Re: [PATCH v2 66/92] overlayfs: convert to ctime accessor functions
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@...il.com>
> > Signed-off-by: Jeff Layton <jlayton@...nel.org>
> ...
> > 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@...e.cz>
>
Thanks, fixed in tree.
--
Jeff Layton <jlayton@...nel.org>
Powered by blists - more mailing lists