]> git.baikalelectronics.ru Git - kernel.git/commit
smb3: fix temporary data corruption in insert range
authorDavid Howells <dhowells@redhat.com>
Tue, 23 Aug 2022 13:07:55 +0000 (14:07 +0100)
committerSteve French <stfrench@microsoft.com>
Mon, 29 Aug 2022 03:34:08 +0000 (22:34 -0500)
commitc097094abf983d978cde8273dd1d69301062cb6e
tree0f9cc697706ca1dbbbab416a7980431298b3a20a
parentdcc33d64e7e983d583a520d766936b7de1b4839a
smb3: fix temporary data corruption in insert range

insert range doesn't discard the affected cached region
so can risk temporarily corrupting file data.

Also includes some minor cleanup (avoiding rereading
inode size repeatedly unnecessarily) to make it clearer.

Cc: stable@vger.kernel.org
Fixes: 308f5d522437 ("cifs: add FALLOC_FL_INSERT_RANGE support")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/smb2ops.c