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 5ab9ab7 commit d7dfba8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions smb2pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -6539,12 +6539,14 @@ static int set_file_basic_info(struct ksmbd_file *fp,
return -EACCES;

inode_lock(inode);
if (attrs.ia_valid & ATTR_ATIME) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)
inode_set_ctime_to_ts(inode, attrs.ia_ctime);
inode_set_ctime_to_ts(inode, attrs.ia_ctime);
#else
inode->i_ctime = attrs.ia_ctime;
inode->i_ctime = attrs.ia_ctime;
#endif
attrs.ia_valid &= ~ATTR_CTIME;
attrs.ia_valid &= ~ATTR_CTIME;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
rc = notify_change(idmap, dentry, &attrs, NULL);
Expand Down

0 comments on commit d7dfba8

Please sign in to comment.