Skip to content

Commit 95fc878

Browse files
jtlaytonMa Wupeng
authored andcommitted
squashfs: convert to new timestamp accessors
stable inclusion from stable-v6.6.30 commit 331b6339c4853ae7dda1a7ae6bbd06d4678304e0 bugzilla: https://gitee.com/openeuler/kernel/issues/I9MPZ8 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=331b6339c4853ae7dda1a7ae6bbd06d4678304e0 -------------------------------- [ Upstream commit a1f13ed8c74893ed31d41c5bca156a623b0e9a86 ] Convert to using the new inode timestamp accessor functions. Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://lore.kernel.org/r/20231004185347.80880-68-jlayton@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> Stable-dep-of: 9253c54e01b6 ("Squashfs: check the inode number is not the invalid value of zero") Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: ZhangPeng <zhangpeng362@huawei.com>
1 parent e049fea commit 95fc878

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/squashfs/inode.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ static int squashfs_new_inode(struct super_block *sb, struct inode *inode,
5959
i_uid_write(inode, i_uid);
6060
i_gid_write(inode, i_gid);
6161
inode->i_ino = le32_to_cpu(sqsh_ino->inode_number);
62-
inode->i_mtime.tv_sec = le32_to_cpu(sqsh_ino->mtime);
63-
inode->i_atime.tv_sec = inode->i_mtime.tv_sec;
64-
inode_set_ctime(inode, inode->i_mtime.tv_sec, 0);
62+
inode_set_mtime(inode, le32_to_cpu(sqsh_ino->mtime), 0);
63+
inode_set_atime(inode, inode_get_mtime_sec(inode), 0);
64+
inode_set_ctime(inode, inode_get_mtime_sec(inode), 0);
6565
inode->i_mode = le16_to_cpu(sqsh_ino->mode);
6666
inode->i_size = 0;
6767

0 commit comments

Comments
 (0)