]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
NFS/flexfiles: Remove dead code in ff_layout_mirror_valid()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 28 Feb 2019 16:35:33 +0000 (11:35 -0500)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 2 Mar 2019 03:37:38 +0000 (22:37 -0500)
nfs4_ff_alloc_deviceid_node() guarantees that if mirror->mirror_ds is
a valid pointer, then so is mirror->mirror_ds->ds.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/flexfilelayout/flexfilelayoutdev.c

index d8ef4042f25a5314afee9e69a996a4e853313cef..69fec9fe7f6ce3f5f5b65b37f8ad91c10a09b6fe 100644 (file)
@@ -183,15 +183,6 @@ out_err:
        return NULL;
 }
 
-static void ff_layout_mark_devid_invalid(struct pnfs_layout_segment *lseg,
-               struct nfs4_deviceid_node *devid)
-{
-       nfs4_mark_deviceid_unavailable(devid);
-       if (!ff_layout_has_available_ds(lseg))
-               pnfs_error_mark_layout_for_return(lseg->pls_layout->plh_inode,
-                               lseg);
-}
-
 static bool ff_layout_mirror_valid(struct pnfs_layout_segment *lseg,
                                   struct nfs4_ff_layout_mirror *mirror,
                                   bool create)
@@ -221,12 +212,6 @@ static bool ff_layout_mirror_valid(struct pnfs_layout_segment *lseg,
        if (IS_ERR(mirror->mirror_ds))
                goto outerr;
 
-       if (mirror->mirror_ds->ds == NULL) {
-               struct nfs4_deviceid_node *devid;
-               devid = &mirror->mirror_ds->id_node;
-               ff_layout_mark_devid_invalid(lseg, devid);
-               return false;
-       }
        return true;
 outerr:
        return false;