Files
linux/fs
Pavel Shilovsky 24b643cfb2 CIFS: Fix read after write for files with read caching
commit 6dfbd84684 upstream.

When we have a READ lease for a file and have just issued a write
operation to the server we need to purge the cache and set oplock/lease
level to NONE to avoid reading stale data. Currently we do that
only if a write operation succedeed thus not covering cases when
a request was sent to the server but a negative error code was
returned later for some other reasons (e.g. -EIOCBQUEUED or -EINTR).
Fix this by turning off caching regardless of the error code being
returned.

The patches fixes generic tests 075 and 112 from the xfs-tests.

Cc: <stable@vger.kernel.org>
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-15 12:05:47 +09:00
..
2018-05-30 13:19:56 +02:00
2016-05-20 17:58:30 -07:00
2023-05-15 10:05:16 +09:00
2023-05-15 08:58:11 +09:00
2023-05-15 10:31:48 +09:00
2017-11-30 08:39:04 +00:00
2023-05-15 11:49:44 +09:00
2023-05-15 11:22:51 +09:00
2023-05-15 10:36:26 +09:00
2016-09-27 21:20:53 -04:00
2017-07-05 16:18:14 +02:00
2023-05-15 11:50:09 +09:00
2016-09-27 18:47:38 -04:00
2018-05-16 11:39:34 +02:00
2017-09-20 09:59:51 +02:00
2017-09-26 00:32:37 -07:00
2017-09-26 00:32:37 -07:00
2018-02-17 13:21:15 +01:00
2017-07-12 17:07:29 +02:00
2017-07-21 08:55:50 +02:00
2017-06-14 15:06:01 +02:00
2017-12-20 10:51:15 +01:00