]>
Commit | Line | Data |
---|---|---|
90a0f3ad GKH |
1 | From 8127d82705998568b52ac724e28e00941538083d Mon Sep 17 00:00:00 2001 |
2 | From: Trond Myklebust <trond.myklebust@hammerspace.com> | |
3 | Date: Fri, 15 Feb 2019 16:08:25 -0500 | |
4 | Subject: NFS: Don't recoalesce on error in nfs_pageio_complete_mirror() | |
5 | ||
6 | From: Trond Myklebust <trond.myklebust@hammerspace.com> | |
7 | ||
8 | commit 8127d82705998568b52ac724e28e00941538083d upstream. | |
9 | ||
10 | If the I/O completion failed with a fatal error, then we should just | |
11 | exit nfs_pageio_complete_mirror() rather than try to recoalesce. | |
12 | ||
13 | Fixes: a7d42ddb3099 ("nfs: add mirroring support to pgio layer") | |
14 | Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> | |
15 | Cc: stable@vger.kernel.org # v4.0+ | |
16 | Signed-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 | @@ -1202,7 +1202,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; |