smb3: fix caching of ctime on setxattr

[ Upstream commit 5923d6686a100c2b4cabd4c2ca9d5a12579c7614 ]

Fixes xfstest generic/728 which had been failing due to incorrect
ctime after setxattr and removexattr

Update ctime on successful set of xattr

Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Steve French 2023-11-07 21:38:13 -06:00 коммит произвёл Greg Kroah-Hartman
Родитель 15b4158c87
Коммит bb08df40d4
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -150,10 +150,13 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR)
goto out; goto out;
if (pTcon->ses->server->ops->set_EA) if (pTcon->ses->server->ops->set_EA) {
rc = pTcon->ses->server->ops->set_EA(xid, pTcon, rc = pTcon->ses->server->ops->set_EA(xid, pTcon,
full_path, name, value, (__u16)size, full_path, name, value, (__u16)size,
cifs_sb->local_nls, cifs_sb); cifs_sb->local_nls, cifs_sb);
if (rc == 0)
inode_set_ctime_current(inode);
}
break; break;
case XATTR_CIFS_ACL: case XATTR_CIFS_ACL: