summaryrefslogtreecommitdiff
path: root/fs/erofs/inode.c
diff options
context:
space:
mode:
authorDavid Anderson <dvander@google.com>2022-03-17 19:49:59 +0800
committerGao Xiang <hsiangkao@linux.alibaba.com>2022-03-17 23:41:14 +0800
commita1108dcd9373a98f7018aa4310076260b8ecfc0b (patch)
tree6b361359bc557cc8090e241996dd3da332cca7d8 /fs/erofs/inode.c
parent500edd0956487281a6fa0e1e34e931817e85d8b6 (diff)
erofs: rename ctime to mtime
EROFS images should inherit modification time rather than change time, since users and host tooling have no easy way to control change time. To reflect the new timestamp meaning, i_ctime and i_ctime_nsec are renamed to i_mtime and i_mtime_nsec. Link: https://lore.kernel.org/r/20220311041829.3109511-1-dvander@google.com # v1 Signed-off-by: David Anderson <dvander@google.com> [ Gao Xiang: update document as well. ] Reviewed-by: Chao Yu <chao@kernel.org> Link: https://lore.kernel.org/r/20220317114959.106787-1-hsiangkao@linux.alibaba.com # v2 Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Diffstat (limited to 'fs/erofs/inode.c')
-rw-r--r--fs/erofs/inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c
index ff62f84f47d3..e8b37ba5e9ad 100644
--- a/fs/erofs/inode.c
+++ b/fs/erofs/inode.c
@@ -113,8 +113,8 @@ static void *erofs_read_inode(struct erofs_buf *buf,
set_nlink(inode, le32_to_cpu(die->i_nlink));
/* extended inode has its own timestamp */
- inode->i_ctime.tv_sec = le64_to_cpu(die->i_ctime);
- inode->i_ctime.tv_nsec = le32_to_cpu(die->i_ctime_nsec);
+ inode->i_ctime.tv_sec = le64_to_cpu(die->i_mtime);
+ inode->i_ctime.tv_nsec = le32_to_cpu(die->i_mtime_nsec);
inode->i_size = le64_to_cpu(die->i_size);