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

Commit 8e548edb authored by Andy Adamson's avatar Andy Adamson Committed by Anna Schumaker
Browse files

NFS refactor nfs4_match_clientids



For session trunking, to compare nfs41_exchange_id_res with
exiting nfs_client.

Signed-off-by: default avatarAndy Adamson <andros@netapp.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent 8d89bd70
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -562,15 +562,15 @@ int nfs40_walk_client_list(struct nfs_client *new,
/*
/*
 * Returns true if the client IDs match
 * Returns true if the client IDs match
 */
 */
static bool nfs4_match_clientids(struct nfs_client *a, struct nfs_client *b)
static bool nfs4_match_clientids(u64 a, u64 b)
{
{
	if (a->cl_clientid != b->cl_clientid) {
	if (a != b) {
		dprintk("NFS: --> %s client ID %llx does not match %llx\n",
		dprintk("NFS: --> %s client ID %llx does not match %llx\n",
			__func__, a->cl_clientid, b->cl_clientid);
			__func__, a, b);
		return false;
		return false;
	}
	}
	dprintk("NFS: --> %s client ID %llx matches %llx\n",
	dprintk("NFS: --> %s client ID %llx matches %llx\n",
		__func__, a->cl_clientid, b->cl_clientid);
		__func__, a, b);
	return true;
	return true;
}
}


@@ -650,7 +650,7 @@ int nfs41_walk_client_list(struct nfs_client *new,
		if (pos->cl_cons_state != NFS_CS_READY)
		if (pos->cl_cons_state != NFS_CS_READY)
			continue;
			continue;


		if (!nfs4_match_clientids(pos, new))
		if (!nfs4_match_clientids(pos->cl_clientid, new->cl_clientid))
			continue;
			continue;


		/*
		/*