Zhang Xiaoxu 6b69040247 cifs/smb3: Fix data inconsistent when zero file range
CIFS implements the fallocate(FALLOC_FL_ZERO_RANGE) with send SMB
ioctl(FSCTL_SET_ZERO_DATA) to server. It just set the range of the
remote file to zero, but local page cache not update, then the data
inconsistent with server, which leads the xfstest generic/008 failed.

So we need to remove the local page caches before send SMB
ioctl(FSCTL_SET_ZERO_DATA) to server. After next read, it will
re-cache it.

Fixes: 30175628bf7f5 ("[SMB3] Enable fallocate -z support for SMB3 mounts")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Cc: stable@vger.kernel.org # v3.17
Signed-off-by: Steve French <stfrench@microsoft.com>
2020-06-23 19:06:27 -05:00
..
2020-06-01 00:10:18 -05:00
2020-06-01 00:10:18 -05:00
2020-06-01 00:10:18 -05:00
2020-06-01 00:10:18 -05:00
2020-06-01 00:10:18 -05:00
2020-06-01 00:10:18 -05:00
2020-06-01 00:10:18 -05:00
2020-06-01 00:10:18 -05:00
2020-06-01 00:10:18 -05:00
2020-06-01 00:10:18 -05:00
2019-09-24 23:31:32 -05:00
2019-01-24 09:37:33 -06:00