Skip to content

Commit 5923d66

Browse files
author
Steve French
committed
smb3: fix caching of ctime on setxattr
Fixes xfstest generic/728 which had been failing due to incorrect ctime after setxattr and removexattr Update ctime on successful set of xattr Cc: [email protected] Signed-off-by: Steve French <[email protected]>
1 parent f72d965 commit 5923d66

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fs/smb/client/xattr.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,13 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
150150
if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
151151
goto out;
152152

153-
if (pTcon->ses->server->ops->set_EA)
153+
if (pTcon->ses->server->ops->set_EA) {
154154
rc = pTcon->ses->server->ops->set_EA(xid, pTcon,
155155
full_path, name, value, (__u16)size,
156156
cifs_sb->local_nls, cifs_sb);
157+
if (rc == 0)
158+
inode_set_ctime_current(inode);
159+
}
157160
break;
158161

159162
case XATTR_CIFS_ACL:

0 commit comments

Comments
 (0)