Skip to content
Snippets Groups Projects
Commit fd197555 authored by Zhang Xiaoxu's avatar Zhang Xiaoxu Committed by Yang Yingliang
Browse files

cifs: update ctime and mtime during truncate


stable inclusion
from linux-4.19.133
commit 38bcc785c2eb67b22caca3ec4ac7ce08bcc65326

--------------------------------

[ Upstream commit 5618303d ]

As the man description of the truncate, if the size changed,
then the st_ctime and st_mtime fields should be updated. But
in cifs, we doesn't do it.

It lead the xfstests generic/313 failed.

So, add the ATTR_MTIME|ATTR_CTIME flags on attrs when change
the file size

Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarZhang Xiaoxu <zhangxiaoxu5@huawei.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 837f42b9
No related branches found
No related tags found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment