2023-06-21 15:08:24

by Jeff Layton

[permalink] [raw]
Subject: [PATCH 06/79] ibm: switch to new ctime accessors

In later patches, we're going to change how the ctime.tv_nsec field is
utilized. Switch to using accessor functions instead of raw accesses of
inode->i_ctime.

Signed-off-by: Jeff Layton <[email protected]>
---
drivers/misc/ibmasm/ibmasmfs.c | 2 +-
drivers/misc/ibmvmc.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/ibmasm/ibmasmfs.c b/drivers/misc/ibmasm/ibmasmfs.c
index 35fec1bf1b3d..34d41b2a0d89 100644
--- a/drivers/misc/ibmasm/ibmasmfs.c
+++ b/drivers/misc/ibmasm/ibmasmfs.c
@@ -139,7 +139,7 @@ static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode)
if (ret) {
ret->i_ino = get_next_ino();
ret->i_mode = mode;
- ret->i_atime = ret->i_mtime = ret->i_ctime = current_time(ret);
+ ret->i_atime = ret->i_mtime = inode_ctime_set_current(ret);
}
return ret;
}
diff --git a/drivers/misc/ibmvmc.c b/drivers/misc/ibmvmc.c
index d7c7f0305257..b69c978c2590 100644
--- a/drivers/misc/ibmvmc.c
+++ b/drivers/misc/ibmvmc.c
@@ -1124,7 +1124,7 @@ static ssize_t ibmvmc_write(struct file *file, const char *buffer,
goto out;

inode = file_inode(file);
- inode->i_mtime = inode->i_ctime = current_time(inode);
+ inode->i_mtime = inode_ctime_set_current(inode);
mark_inode_dirty(inode);

dev_dbg(adapter->dev, "write: file = 0x%lx, count = 0x%lx\n",
--
2.41.0



2023-06-21 15:37:45

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 06/79] ibm: switch to new ctime accessors

On Wed, Jun 21, 2023 at 10:45:19AM -0400, Jeff Layton wrote:
> In later patches, we're going to change how the ctime.tv_nsec field is
> utilized. Switch to using accessor functions instead of raw accesses of
> inode->i_ctime.
>
> Signed-off-by: Jeff Layton <[email protected]>
> ---
> drivers/misc/ibmasm/ibmasmfs.c | 2 +-
> drivers/misc/ibmvmc.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)

Acked-by: Greg Kroah-Hartman <[email protected]>

2023-06-21 16:50:40

by Jan Kara

[permalink] [raw]
Subject: Re: [PATCH 06/79] ibm: switch to new ctime accessors

On Wed 21-06-23 10:45:19, Jeff Layton wrote:
> In later patches, we're going to change how the ctime.tv_nsec field is
> utilized. Switch to using accessor functions instead of raw accesses of
> inode->i_ctime.
>
> Signed-off-by: Jeff Layton <[email protected]>

Looks good to me. Feel free to add:

Reviewed-by: Jan Kara <[email protected]>

Honza

> ---
> drivers/misc/ibmasm/ibmasmfs.c | 2 +-
> drivers/misc/ibmvmc.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/misc/ibmasm/ibmasmfs.c b/drivers/misc/ibmasm/ibmasmfs.c
> index 35fec1bf1b3d..34d41b2a0d89 100644
> --- a/drivers/misc/ibmasm/ibmasmfs.c
> +++ b/drivers/misc/ibmasm/ibmasmfs.c
> @@ -139,7 +139,7 @@ static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode)
> if (ret) {
> ret->i_ino = get_next_ino();
> ret->i_mode = mode;
> - ret->i_atime = ret->i_mtime = ret->i_ctime = current_time(ret);
> + ret->i_atime = ret->i_mtime = inode_ctime_set_current(ret);
> }
> return ret;
> }
> diff --git a/drivers/misc/ibmvmc.c b/drivers/misc/ibmvmc.c
> index d7c7f0305257..b69c978c2590 100644
> --- a/drivers/misc/ibmvmc.c
> +++ b/drivers/misc/ibmvmc.c
> @@ -1124,7 +1124,7 @@ static ssize_t ibmvmc_write(struct file *file, const char *buffer,
> goto out;
>
> inode = file_inode(file);
> - inode->i_mtime = inode->i_ctime = current_time(inode);
> + inode->i_mtime = inode_ctime_set_current(inode);
> mark_inode_dirty(inode);
>
> dev_dbg(adapter->dev, "write: file = 0x%lx, count = 0x%lx\n",
> --
> 2.41.0
>
--
Jan Kara <[email protected]>
SUSE Labs, CR