]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
NFS: Don't recoalesce on error in nfs_pageio_complete_mirror()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 15 Feb 2019 21:08:25 +0000 (16:08 -0500)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
BugLink: https://bugs.launchpad.net/bugs/1837952
commit 8127d82705998568b52ac724e28e00941538083d upstream.

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+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/nfs/pagelist.c

index dfed48dc216fc4fb5e4a786fc0608ddffbca3472..28b013d1d44aef444691bfae74b3c26ff0a1bad5 100644 (file)
@@ -1213,7 +1213,7 @@ static void nfs_pageio_complete_mirror(struct nfs_pageio_descriptor *desc,
                desc->pg_mirror_idx = mirror_idx;
        for (;;) {
                nfs_pageio_doio(desc);
-               if (!mirror->pg_recoalesce)
+               if (desc->pg_error < 0 || !mirror->pg_recoalesce)
                        break;
                if (!nfs_do_recoalesce(desc))
                        break;