Skip to content

Commit

Permalink
ksmbd: fix
Browse files Browse the repository at this point in the history
Signed-off-by: Namjae Jeon <[email protected]>
  • Loading branch information
namjaejeon committed Dec 6, 2024
1 parent 91a0deb commit f31a4e6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion smb2pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -6485,9 +6485,14 @@ static int set_file_basic_info(struct ksmbd_file *fp,
attrs.ia_valid |= (ATTR_ATIME | ATTR_ATIME_SET);
}

if (file_info->ChangeTime)
if (file_info->ChangeTime) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)
inode_set_ctime_to_ts(inode,
ksmbd_NTtimeToUnix(file_info->ChangeTime));
#else
inode->i_ctime = ksmbd_NTtimeToUnix(file_info->ChangeTime);
#endif
}

if (file_info->LastWriteTime) {
attrs.ia_mtime = ksmbd_NTtimeToUnix(file_info->LastWriteTime);
Expand Down

0 comments on commit f31a4e6

Please sign in to comment.