[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230706105713.7drqohk4by4b5qmu@quack3>
Date: Thu, 6 Jul 2023 12:57:13 +0200
From: Jan Kara <jack@...e.cz>
To: Jeff Layton <jlayton@...nel.org>
Cc: Christian Brauner <brauner@...nel.org>,
Jeremy Kerr <jk@...abs.org>, Ard Biesheuvel <ardb@...nel.org>,
Al Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.cz>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-efi@...r.kernel.org
Subject: Re: [PATCH v2 37/92] efivarfs: convert to ctime accessor functions
On Wed 05-07-23 15:01:02, 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/efivarfs/file.c | 2 +-
> fs/efivarfs/inode.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/efivarfs/file.c b/fs/efivarfs/file.c
> index 375576111dc3..59b52718a3a2 100644
> --- a/fs/efivarfs/file.c
> +++ b/fs/efivarfs/file.c
> @@ -51,7 +51,7 @@ static ssize_t efivarfs_file_write(struct file *file,
> } else {
> inode_lock(inode);
> i_size_write(inode, datasize + sizeof(attributes));
> - inode->i_mtime = inode->i_ctime = current_time(inode);
> + inode->i_mtime = inode_set_ctime_current(inode);
> inode_unlock(inode);
> }
>
> diff --git a/fs/efivarfs/inode.c b/fs/efivarfs/inode.c
> index b973a2c03dde..db9231f0e77b 100644
> --- a/fs/efivarfs/inode.c
> +++ b/fs/efivarfs/inode.c
> @@ -25,7 +25,7 @@ struct inode *efivarfs_get_inode(struct super_block *sb,
> if (inode) {
> inode->i_ino = get_next_ino();
> inode->i_mode = mode;
> - inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
> + inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode);
> inode->i_flags = is_removable ? 0 : S_IMMUTABLE;
> switch (mode & S_IFMT) {
> case S_IFREG:
> --
> 2.41.0
>
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists