]> www.infradead.org Git - users/hch/configfs.git/commit
cifs: Fix copy offload to flush destination region
authorDavid Howells <dhowells@redhat.com>
Tue, 27 Aug 2024 14:47:27 +0000 (15:47 +0100)
committerSteve French <stfrench@microsoft.com>
Wed, 28 Aug 2024 12:48:33 +0000 (07:48 -0500)
commit8101d6e112e2524e967368f920c404ae445a9757
tree8c62010787075f9c89a10a9da2892d94d19f4a2c
parent1da29f2c39b67b846b74205c81bf0ccd96d34727
cifs: Fix copy offload to flush destination region

Fix cifs_file_copychunk_range() to flush the destination region before
invalidating it to avoid potential loss of data should the copy fail, in
whole or in part, in some way.

Fixes: 7b2404a886f8 ("cifs: Fix flushing, invalidation and file size with copy_file_range()")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Steve French <stfrench@microsoft.com>
cc: Paulo Alcantara <pc@manguebit.com>
cc: Shyam Prasad N <nspmangalore@gmail.com>
cc: Rohith Surabattula <rohiths.msft@gmail.com>
cc: Matthew Wilcox <willy@infradead.org>
cc: Jeff Layton <jlayton@kernel.org>
cc: linux-cifs@vger.kernel.org
cc: linux-mm@kvack.org
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifsfs.c