nfs: don't call nfs4_ff_layout_prepare_ds from ff_layout_get_ds_cred
authorJeff Layton <jlayton@poochiereds.net>
Fri, 22 Apr 2016 00:51:57 +0000 (20:51 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 9 May 2016 13:05:40 +0000 (09:05 -0400)
All the callers already call that function before calling into here,
so it ends up being a no-op anyway.

Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/flexfilelayout/flexfilelayoutdev.c

index add0e5a70bd60f70479452ddc8a0ccf853c2c87f..a0dbf94d15ae61739e4cde6b66c7df776218cc12 100644 (file)
@@ -433,16 +433,12 @@ ff_layout_get_ds_cred(struct pnfs_layout_segment *lseg, u32 ds_idx,
                      struct rpc_cred *mdscred)
 {
        struct nfs4_ff_layout_mirror *mirror = FF_LAYOUT_COMP(lseg, ds_idx);
-       struct rpc_cred *cred = ERR_PTR(-EINVAL);
-
-       if (!nfs4_ff_layout_prepare_ds(lseg, ds_idx, true))
-               goto out;
+       struct rpc_cred *cred;
 
        if (mirror && mirror->cred)
                cred = mirror->cred;
        else
                cred = mdscred;
-out:
        return cred;
 }