nfsd: Remove unused clientid arguments from, find_lockowner_str{_locked}
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
parent
76f6c9e176
commit
c8623999ff
1 changed files with 6 additions and 10 deletions
|
@ -5136,8 +5136,7 @@ nevermind:
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct nfs4_lockowner *
|
static struct nfs4_lockowner *
|
||||||
find_lockowner_str_locked(clientid_t *clid, struct xdr_netobj *owner,
|
find_lockowner_str_locked(struct nfs4_client *clp, struct xdr_netobj *owner)
|
||||||
struct nfs4_client *clp)
|
|
||||||
{
|
{
|
||||||
unsigned int strhashval = ownerstr_hashval(owner);
|
unsigned int strhashval = ownerstr_hashval(owner);
|
||||||
struct nfs4_stateowner *so;
|
struct nfs4_stateowner *so;
|
||||||
|
@ -5155,13 +5154,12 @@ find_lockowner_str_locked(clientid_t *clid, struct xdr_netobj *owner,
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct nfs4_lockowner *
|
static struct nfs4_lockowner *
|
||||||
find_lockowner_str(clientid_t *clid, struct xdr_netobj *owner,
|
find_lockowner_str(struct nfs4_client *clp, struct xdr_netobj *owner)
|
||||||
struct nfs4_client *clp)
|
|
||||||
{
|
{
|
||||||
struct nfs4_lockowner *lo;
|
struct nfs4_lockowner *lo;
|
||||||
|
|
||||||
spin_lock(&clp->cl_lock);
|
spin_lock(&clp->cl_lock);
|
||||||
lo = find_lockowner_str_locked(clid, owner, clp);
|
lo = find_lockowner_str_locked(clp, owner);
|
||||||
spin_unlock(&clp->cl_lock);
|
spin_unlock(&clp->cl_lock);
|
||||||
return lo;
|
return lo;
|
||||||
}
|
}
|
||||||
|
@ -5205,8 +5203,7 @@ alloc_init_lock_stateowner(unsigned int strhashval, struct nfs4_client *clp,
|
||||||
lo->lo_owner.so_seqid = lock->lk_new_lock_seqid;
|
lo->lo_owner.so_seqid = lock->lk_new_lock_seqid;
|
||||||
lo->lo_owner.so_ops = &lockowner_ops;
|
lo->lo_owner.so_ops = &lockowner_ops;
|
||||||
spin_lock(&clp->cl_lock);
|
spin_lock(&clp->cl_lock);
|
||||||
ret = find_lockowner_str_locked(&clp->cl_clientid,
|
ret = find_lockowner_str_locked(clp, &lock->lk_new_owner);
|
||||||
&lock->lk_new_owner, clp);
|
|
||||||
if (ret == NULL) {
|
if (ret == NULL) {
|
||||||
list_add(&lo->lo_owner.so_strhash,
|
list_add(&lo->lo_owner.so_strhash,
|
||||||
&clp->cl_ownerstr_hashtbl[strhashval]);
|
&clp->cl_ownerstr_hashtbl[strhashval]);
|
||||||
|
@ -5326,7 +5323,7 @@ lookup_or_create_lock_state(struct nfsd4_compound_state *cstate,
|
||||||
struct nfs4_lockowner *lo;
|
struct nfs4_lockowner *lo;
|
||||||
unsigned int strhashval;
|
unsigned int strhashval;
|
||||||
|
|
||||||
lo = find_lockowner_str(&cl->cl_clientid, &lock->lk_new_owner, cl);
|
lo = find_lockowner_str(cl, &lock->lk_new_owner);
|
||||||
if (!lo) {
|
if (!lo) {
|
||||||
strhashval = ownerstr_hashval(&lock->lk_new_owner);
|
strhashval = ownerstr_hashval(&lock->lk_new_owner);
|
||||||
lo = alloc_init_lock_stateowner(strhashval, cl, ost, lock);
|
lo = alloc_init_lock_stateowner(strhashval, cl, ost, lock);
|
||||||
|
@ -5601,8 +5598,7 @@ nfsd4_lockt(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
lo = find_lockowner_str(&lockt->lt_clientid, &lockt->lt_owner,
|
lo = find_lockowner_str(cstate->clp, &lockt->lt_owner);
|
||||||
cstate->clp);
|
|
||||||
if (lo)
|
if (lo)
|
||||||
file_lock->fl_owner = (fl_owner_t)lo;
|
file_lock->fl_owner = (fl_owner_t)lo;
|
||||||
file_lock->fl_pid = current->tgid;
|
file_lock->fl_pid = current->tgid;
|
||||||
|
|
Loading…
Add table
Reference in a new issue