Ronnie Sahlberg 64f23e5430 cifs: destage dirty pages before re-reading them for cache=none
commit bb44c31cdcac107344dd2fcc3bd0504a53575c51 upstream.

This is the opposite case of kernel bugzilla 216301.
If we mmap a file using cache=none and then proceed to update the mmapped
area these updates are not reflected in a later pread() of that part of the
file.
To fix this we must first destage any dirty pages in the range before
we allow the pread() to proceed.

Cc: stable@vger.kernel.org
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Reviewed-by: Enzo Matsumiya <ematsumiya@suse.de>
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-10-26 13:25:07 +02:00
..
2020-10-16 11:11:22 -07:00
2021-09-18 13:40:15 +02:00
2020-09-10 14:03:31 -07:00
2022-06-09 10:21:16 +02:00
2020-08-04 21:02:38 -04:00
2020-10-23 11:33:41 -07:00
2020-10-23 11:33:41 -07:00
2020-08-27 16:06:47 -04:00
2020-07-31 08:16:01 +02:00