[14/79] befs: switch to new ctime accessors

Message ID 20230621144735.55953-13-jlayton@kernel.org
State New
Headers
Series None |

Commit Message

Jeff Layton June 21, 2023, 2:45 p.m. UTC
  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 <jlayton@kernel.org>
---
 fs/befs/linuxvfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Jan Kara June 21, 2023, 4:44 p.m. UTC | #1
On Wed 21-06-23 10:45:27, 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 <jlayton@kernel.org>

Looks good to me. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/befs/linuxvfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
> index eee9237386e2..1eee7baa808b 100644
> --- a/fs/befs/linuxvfs.c
> +++ b/fs/befs/linuxvfs.c
> @@ -363,7 +363,7 @@ static struct inode *befs_iget(struct super_block *sb, unsigned long ino)
>  	inode->i_mtime.tv_sec =
>  	    fs64_to_cpu(sb, raw_inode->last_modified_time) >> 16;
>  	inode->i_mtime.tv_nsec = 0;   /* lower 16 bits are not a time */
> -	inode->i_ctime = inode->i_mtime;
> +	inode_ctime_set(inode, inode->i_mtime);
>  	inode->i_atime = inode->i_mtime;
>  
>  	befs_ino->i_inode_num = fsrun_to_cpu(sb, raw_inode->inode_num);
> -- 
> 2.41.0
>
  

Patch

diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index eee9237386e2..1eee7baa808b 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -363,7 +363,7 @@  static struct inode *befs_iget(struct super_block *sb, unsigned long ino)
 	inode->i_mtime.tv_sec =
 	    fs64_to_cpu(sb, raw_inode->last_modified_time) >> 16;
 	inode->i_mtime.tv_nsec = 0;   /* lower 16 bits are not a time */
-	inode->i_ctime = inode->i_mtime;
+	inode_ctime_set(inode, inode->i_mtime);
 	inode->i_atime = inode->i_mtime;
 
 	befs_ino->i_inode_num = fsrun_to_cpu(sb, raw_inode->inode_num);