smb3: fix touch -h of symlink
authorSteve French <stfrench@microsoft.com>
Mon, 16 Oct 2023 17:18:23 +0000 (12:18 -0500)
committerSteve French <stfrench@microsoft.com>
Mon, 23 Oct 2023 00:03:41 +0000 (19:03 -0500)
For example:
      touch -h -t 02011200 testfile
where testfile is a symlink would not change the timestamp, but
      touch -t 02011200 testfile
does work to change the timestamp of the target

Suggested-by: David Howells <dhowells@redhat.com>
Reported-by: Micah Veilleux <micah.veilleux@iba-group.com>
Closes: https://bugzilla.samba.org/show_bug.cgi?id=14476
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifsfs.c

index 22869cda13565e5838b7711c844963f1a6d87bd9..ea3a7a668b45f38ccfa6079449e666f2e6c9877b 100644 (file)
@@ -1191,6 +1191,7 @@ const char *cifs_get_link(struct dentry *dentry, struct inode *inode,
 
 const struct inode_operations cifs_symlink_inode_ops = {
        .get_link = cifs_get_link,
+       .setattr = cifs_setattr,
        .permission = cifs_permission,
        .listxattr = cifs_listxattr,
 };