Steve French fa30a81f25 smb3: fix temporary data corruption in collapse range
collapse range doesn't discard the affected cached region
so can risk temporarily corrupting the file data. This
fixes xfstest generic/031

I also decided to merge a minor cleanup to this into the same patch
(avoiding rereading inode size repeatedly unnecessarily) to make it
clearer.

Cc: stable@vger.kernel.org
Fixes: 5476b5dd82c8b ("cifs: add support for FALLOC_FL_COLLAPSE_RANGE")
Reported-by: David Howells <dhowells@redhat.com>
Tested-by: David Howells <dhowells@redhat.com>
Reviewed-by: David Howells <dhowells@redhat.com>
cc: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2022-08-28 22:34:07 -05:00
..
2021-06-20 21:28:17 -05:00
2022-08-05 11:24:17 -05:00
2022-01-19 11:21:08 -06:00
2022-05-23 20:24:12 -05:00
2019-01-24 09:37:33 -06:00
2022-06-16 18:07:10 -05:00
2021-04-25 16:28:23 -05:00