]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
smb3: fix touch -h of symlink
authorSteve French <stfrench@microsoft.com>
Mon, 16 Oct 2023 17:18:23 +0000 (12:18 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Dec 2023 07:48:04 +0000 (08:48 +0100)
[ Upstream commit 475efd9808a3094944a56240b2711349e433fb66 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/cifs/cifsfs.c

index b5ae209539ff12bc20637efb3489895314dcc5db..af688e39f31acc8d6ad535059d64dd9c6d01c9e9 100644 (file)
@@ -1127,6 +1127,7 @@ const struct inode_operations cifs_file_inode_ops = {
 
 const struct inode_operations cifs_symlink_inode_ops = {
        .get_link = cifs_get_link,
+       .setattr = cifs_setattr,
        .permission = cifs_permission,
        .listxattr = cifs_listxattr,
 };