Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 231135
b: refs/heads/master
c: 6e5f15c
h: refs/heads/master
i:
  231133: 3114f48
  231131: 54840d0
  231127: e205b42
  231119: 70eded3
  231103: 53e91ba
v: v3
  • Loading branch information
J. Bruce Fields committed Dec 17, 2010
1 parent 3fa5acc commit 415bec1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ec66ee3797e5848356cf593c6ec7aabf30a00cf1
refs/heads/master: 6e5f15c93dc745d46c2bb9e4597b44463203844b
14 changes: 4 additions & 10 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,19 +1135,13 @@ find_unconfirmed_client(clientid_t *clid)
}

/*
* Return 1 iff clp's clientid establishment method matches the use_exchange_id
* parameter. Matching is based on the fact the at least one of the
* EXCHGID4_FLAG_USE_{NON_PNFS,PNFS_MDS,PNFS_DS} flags must be set for v4.1
*
* FIXME: we need to unify the clientid namespaces for nfsv4.x
* and correctly deal with client upgrade/downgrade in EXCHANGE_ID
* and SET_CLIENTID{,_CONFIRM}
*/
static inline int
match_clientid_establishment(struct nfs4_client *clp, bool use_exchange_id)
static bool clp_used_exchangeid(struct nfs4_client *clp)
{
bool has_exchange_flags = (clp->cl_exchange_flags != 0);
return use_exchange_id == has_exchange_flags;
return clp->cl_exchange_flags != 0;
}

static struct nfs4_client *
Expand All @@ -1158,7 +1152,7 @@ find_confirmed_client_by_str(const char *dname, unsigned int hashval,

list_for_each_entry(clp, &conf_str_hashtbl[hashval], cl_strhash) {
if (same_name(clp->cl_recdir, dname) &&
match_clientid_establishment(clp, use_exchange_id))
clp_used_exchangeid(clp) == use_exchange_id)
return clp;
}
return NULL;
Expand All @@ -1172,7 +1166,7 @@ find_unconfirmed_client_by_str(const char *dname, unsigned int hashval,

list_for_each_entry(clp, &unconf_str_hashtbl[hashval], cl_strhash) {
if (same_name(clp->cl_recdir, dname) &&
match_clientid_establishment(clp, use_exchange_id))
clp_used_exchangeid(clp) == use_exchange_id)
return clp;
}
return NULL;
Expand Down

0 comments on commit 415bec1

Please sign in to comment.