fs: rename i_ctime field to __i_ctime
authorJeff Layton <jlayton@kernel.org>
Wed, 5 Jul 2023 18:58:12 +0000 (14:58 -0400)
committerChristian Brauner <brauner@kernel.org>
Mon, 24 Jul 2023 08:30:08 +0000 (10:30 +0200)
Now that everything in-tree is converted to use the accessor functions,
rename the i_ctime field in the inode to discourage direct access.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Message-Id: <20230705185812.579118-4-jlayton@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
include/linux/fs.h

index 42755cb7d55be762af2e5783cc61f4a4cfee09d5..61f27011fd0474eca4af031cf7a9bd4625a1ca49 100644 (file)
@@ -642,7 +642,7 @@ struct inode {
        loff_t                  i_size;
        struct timespec64       i_atime;
        struct timespec64       i_mtime;
-       struct timespec64       i_ctime;
+       struct timespec64       __i_ctime; /* use inode_*_ctime accessors! */
        spinlock_t              i_lock; /* i_blocks, i_bytes, maybe i_size */
        unsigned short          i_bytes;
        u8                      i_blkbits;
@@ -1485,7 +1485,7 @@ struct timespec64 inode_set_ctime_current(struct inode *inode);
  */
 static inline struct timespec64 inode_get_ctime(const struct inode *inode)
 {
-       return inode->i_ctime;
+       return inode->__i_ctime;
 }
 
 /**
@@ -1498,7 +1498,7 @@ static inline struct timespec64 inode_get_ctime(const struct inode *inode)
 static inline struct timespec64 inode_set_ctime_to_ts(struct inode *inode,
                                                      struct timespec64 ts)
 {
-       inode->i_ctime = ts;
+       inode->__i_ctime = ts;
        return ts;
 }