]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/5.0.4/nfs-don-t-recoalesce-on-error-in-nfs_pageio_complete_mirror.patch
Linux 5.0.4
[thirdparty/kernel/stable-queue.git] / releases / 5.0.4 / nfs-don-t-recoalesce-on-error-in-nfs_pageio_complete_mirror.patch
CommitLineData
cf0c949f
GKH
1From 8127d82705998568b52ac724e28e00941538083d Mon Sep 17 00:00:00 2001
2From: Trond Myklebust <trond.myklebust@hammerspace.com>
3Date: Fri, 15 Feb 2019 16:08:25 -0500
4Subject: NFS: Don't recoalesce on error in nfs_pageio_complete_mirror()
5
6From: Trond Myklebust <trond.myklebust@hammerspace.com>
7
8commit 8127d82705998568b52ac724e28e00941538083d upstream.
9
10If the I/O completion failed with a fatal error, then we should just
11exit nfs_pageio_complete_mirror() rather than try to recoalesce.
12
13Fixes: a7d42ddb3099 ("nfs: add mirroring support to pgio layer")
14Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
15Cc: stable@vger.kernel.org # v4.0+
16Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17
18---
19 fs/nfs/pagelist.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22--- a/fs/nfs/pagelist.c
23+++ b/fs/nfs/pagelist.c
24@@ -1209,7 +1209,7 @@ static void nfs_pageio_complete_mirror(s
25 desc->pg_mirror_idx = mirror_idx;
26 for (;;) {
27 nfs_pageio_doio(desc);
28- if (!mirror->pg_recoalesce)
29+ if (desc->pg_error < 0 || !mirror->pg_recoalesce)
30 break;
31 if (!nfs_do_recoalesce(desc))
32 break;