]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
pNFS/flexfiles: Check the result of nfs4_pnfs_ds_connect
authorTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 20 Apr 2017 18:33:06 +0000 (14:33 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 May 2017 13:46:29 +0000 (15:46 +0200)
commit 260f32adb88dadfaac29f47f761a088238ca164c upstream.

The check in nfs4_ff_layout_prepare_ds() seems to be missing.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Fixes: a33e4b036d461 ("pNFS: return status from nfs4_pnfs_ds_connect")
Cc: Weston Andros Adamson <dros@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/flexfilelayout/flexfilelayoutdev.c

index 457cfeb1d5c162e4177450eb941460a2fe39f3b1..9e0b24a192cce8f736f6a490d899e3188246222b 100644 (file)
@@ -415,7 +415,7 @@ nfs4_ff_layout_prepare_ds(struct pnfs_layout_segment *lseg, u32 ds_idx,
                             mirror->mirror_ds->ds_versions[0].minor_version);
 
        /* connect success, check rsize/wsize limit */
-       if (ds->ds_clp) {
+       if (!status) {
                max_payload =
                        nfs_block_size(rpc_max_payload(ds->ds_clp->cl_rpcclient),
                                       NULL);