[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230706135518.xjfzcvf224wfypeg@quack3>
Date: Thu, 6 Jul 2023 15:55:18 +0200
From: Jan Kara <jack@...e.cz>
To: Jeff Layton <jlayton@...nel.org>
Cc: Christian Brauner <brauner@...nel.org>,
Mike Marshall <hubcap@...ibond.com>,
Martin Brandenburg <martin@...ibond.com>,
Al Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
devel@...ts.orangefs.org
Subject: Re: [PATCH v2 65/92] orangefs: convert to ctime accessor functions
On Wed 05-07-23 15:01:30, 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.
>
> Signed-off-by: Jeff Layton <jlayton@...nel.org>
Looks good. Feel free to add:
Reviewed-by: Jan Kara <jack@...e.cz>
Honza
> ---
> fs/orangefs/namei.c | 2 +-
> fs/orangefs/orangefs-utils.c | 6 +++---
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fs/orangefs/namei.c b/fs/orangefs/namei.c
> index 77518e248cf7..c9dfd5c6a097 100644
> --- a/fs/orangefs/namei.c
> +++ b/fs/orangefs/namei.c
> @@ -421,7 +421,7 @@ static int orangefs_rename(struct mnt_idmap *idmap,
> ret);
>
> if (new_dentry->d_inode)
> - new_dentry->d_inode->i_ctime = current_time(new_dentry->d_inode);
> + inode_set_ctime_current(d_inode(new_dentry));
>
> op_release(new_op);
> return ret;
> diff --git a/fs/orangefs/orangefs-utils.c b/fs/orangefs/orangefs-utils.c
> index 46b7dcff18ac..0a9fcfdf552f 100644
> --- a/fs/orangefs/orangefs-utils.c
> +++ b/fs/orangefs/orangefs-utils.c
> @@ -361,11 +361,11 @@ int orangefs_inode_getattr(struct inode *inode, int flags)
> downcall.resp.getattr.attributes.atime;
> inode->i_mtime.tv_sec = (time64_t)new_op->
> downcall.resp.getattr.attributes.mtime;
> - inode->i_ctime.tv_sec = (time64_t)new_op->
> - downcall.resp.getattr.attributes.ctime;
> + inode_set_ctime(inode,
> + (time64_t)new_op->downcall.resp.getattr.attributes.ctime,
> + 0);
> inode->i_atime.tv_nsec = 0;
> inode->i_mtime.tv_nsec = 0;
> - inode->i_ctime.tv_nsec = 0;
>
> /* special case: mark the root inode as sticky */
> inode->i_mode = type | (is_root_handle(inode) ? S_ISVTX : 0) |
> --
> 2.41.0
>
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists