]> git.itanic.dy.fi Git - linux-stable/commit
cifs: revalidate mapping when doing direct writes
authorRonnie Sahlberg <lsahlber@redhat.com>
Mon, 12 Sep 2022 03:04:46 +0000 (13:04 +1000)
committerSteve French <stfrench@microsoft.com>
Mon, 12 Sep 2022 18:24:08 +0000 (13:24 -0500)
commit7500a99281dfed2d4a84771c933bcb9e17af279b
tree5e3b83a20f65689d97e3bf2d2867ab0631767a35
parent80e78fcce86de0288793a0ef0f6acf37656ee4cf
cifs: revalidate mapping when doing direct writes

Kernel bugzilla: 216301

When doing direct writes we need to also invalidate the mapping in case
we have a cached copy of the affected page(s) in memory or else
subsequent reads of the data might return the old/stale content
before we wrote an update to the server.

Cc: stable@vger.kernel.org
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/file.c