[PATCH][SMB3 client] fix touch -h of symlink

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Looks like some symlink inode operations are missing for other fs as well

-- 
Thanks,

Steve
From 6af5f835ba4987994aecbba0d7c060160c892856 Mon Sep 17 00:00:00 2001
From: Steve French <stfrench@xxxxxxxxxxxxx>
Date: Mon, 16 Oct 2023 12:18:23 -0500
Subject: [PATCH] smb3: fix touch -h of symlink

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

Reported-by: Micah Veilleux <micah.veilleux@xxxxxxxxxxxxx>
Closes: https://bugzilla.samba.org/show_bug.cgi?id=14476
Cc: Stable <stable@xxxxxxxxxxxxxxx>
Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx>
---
 fs/smb/client/cifsfs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/smb/client/cifsfs.c b/fs/smb/client/cifsfs.c
index 22869cda1356..ea3a7a668b45 100644
--- a/fs/smb/client/cifsfs.c
+++ b/fs/smb/client/cifsfs.c
@@ -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,
 };
-- 
2.39.2


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux