cifs: update ctime and mtime during truncate
authorZhang Xiaoxu <zhangxiaoxu5@huawei.com>
Sat, 20 Jun 2020 02:51:29 +0000 (22:51 -0400)
committerSteve French <stfrench@microsoft.com>
Wed, 24 Jun 2020 00:06:27 +0000 (19:06 -0500)
commit5618303d8516f8ac5ecfe53ee8e8bc9a40eaf066
treef9c51b19d0844052fb794603fa90129f86792be5
parentacc91c2d8de4ef46ed751c5f9df99ed9a109b100
cifs: update ctime and mtime during truncate

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: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/inode.c