Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 547a6376 authored by Jeff Layton's avatar Jeff Layton Committed by Anna Schumaker
Browse files

nfs: don't call nfs4_ff_layout_prepare_ds from ff_layout_get_ds_cred



All the callers already call that function before calling into here,
so it ends up being a no-op anyway.

Signed-off-by: default avatarJeff Layton <jeff.layton@primarydata.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 62dbef2a
Loading
Loading
Loading
Loading
+1 −5
Original line number Original line Diff line number Diff line
@@ -433,16 +433,12 @@ ff_layout_get_ds_cred(struct pnfs_layout_segment *lseg, u32 ds_idx,
		      struct rpc_cred *mdscred)
		      struct rpc_cred *mdscred)
{
{
	struct nfs4_ff_layout_mirror *mirror = FF_LAYOUT_COMP(lseg, ds_idx);
	struct nfs4_ff_layout_mirror *mirror = FF_LAYOUT_COMP(lseg, ds_idx);
	struct rpc_cred *cred = ERR_PTR(-EINVAL);
	struct rpc_cred *cred;

	if (!nfs4_ff_layout_prepare_ds(lseg, ds_idx, true))
		goto out;


	if (mirror && mirror->cred)
	if (mirror && mirror->cred)
		cred = mirror->cred;
		cred = mirror->cred;
	else
	else
		cred = mdscred;
		cred = mdscred;
out:
	return cred;
	return cred;
}
}