Skip to content

Commit

Permalink
fs: rename i_ctime field to __i_ctime
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Damien Le Moal <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>
  • Loading branch information
jtlayton authored and brauner committed Jul 24, 2023
1 parent 4c1698d commit 13bc244
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

/**
Expand All @@ -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;
}

Expand Down

0 comments on commit 13bc244

Please sign in to comment.