diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-02-15 16:08:25 -0500 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-02-20 15:14:20 -0500 |
commit | 8127d82705998568b52ac724e28e00941538083d (patch) | |
tree | 54bddab707e6f1dba1724f2df85d3215a7c0f68d | |
parent | 4d91969ed4dbcefd0e78f77494f0cb8fada9048a (diff) |
NFS: Don't recoalesce on error in nfs_pageio_complete_mirror()
If the I/O completion failed with a fatal error, then we should just
exit nfs_pageio_complete_mirror() rather than try to recoalesce.
Fixes: a7d42ddb3099 ("nfs: add mirroring support to pgio layer")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: stable@vger.kernel.org # v4.0+
-rw-r--r-- | fs/nfs/pagelist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 03bde9a41451..a8951f1f7b4e 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c | |||
@@ -1209,7 +1209,7 @@ static void nfs_pageio_complete_mirror(struct nfs_pageio_descriptor *desc, | |||
1209 | desc->pg_mirror_idx = mirror_idx; | 1209 | desc->pg_mirror_idx = mirror_idx; |
1210 | for (;;) { | 1210 | for (;;) { |
1211 | nfs_pageio_doio(desc); | 1211 | nfs_pageio_doio(desc); |
1212 | if (!mirror->pg_recoalesce) | 1212 | if (desc->pg_error < 0 || !mirror->pg_recoalesce) |
1213 | break; | 1213 | break; |
1214 | if (!nfs_do_recoalesce(desc)) | 1214 | if (!nfs_do_recoalesce(desc)) |
1215 | break; | 1215 | break; |