Lines Matching refs:sop
357 nfs4_get_stateowner(struct nfs4_stateowner *sop) in nfs4_get_stateowner() argument
359 atomic_inc(&sop->so_count); in nfs4_get_stateowner()
360 return sop; in nfs4_get_stateowner()
364 same_owner_str(struct nfs4_stateowner *sop, struct xdr_netobj *owner) in same_owner_str() argument
366 return (sop->so_owner.len == owner->len) && in same_owner_str()
367 0 == memcmp(sop->so_owner.data, owner->data, owner->len); in same_owner_str()
1324 static inline void nfs4_free_stateowner(struct nfs4_stateowner *sop) in nfs4_free_stateowner() argument
1326 kfree(sop->so_owner.data); in nfs4_free_stateowner()
1327 sop->so_ops->so_free(sop); in nfs4_free_stateowner()
1330 static void nfs4_put_stateowner(struct nfs4_stateowner *sop) in nfs4_put_stateowner() argument
1332 struct nfs4_client *clp = sop->so_client; in nfs4_put_stateowner()
1336 if (!atomic_dec_and_lock(&sop->so_count, &clp->cl_lock)) in nfs4_put_stateowner()
1338 sop->so_ops->so_unhash(sop); in nfs4_put_stateowner()
1340 nfs4_free_stateowner(sop); in nfs4_put_stateowner()
4212 struct nfs4_stateowner *sop; in alloc_stateowner() local
4214 sop = kmem_cache_alloc(slab, GFP_KERNEL); in alloc_stateowner()
4215 if (!sop) in alloc_stateowner()
4218 xdr_netobj_dup(&sop->so_owner, owner, GFP_KERNEL); in alloc_stateowner()
4219 if (!sop->so_owner.data) { in alloc_stateowner()
4220 kmem_cache_free(slab, sop); in alloc_stateowner()
4224 INIT_LIST_HEAD(&sop->so_stateids); in alloc_stateowner()
4225 sop->so_client = clp; in alloc_stateowner()
4226 init_nfs4_replay(&sop->so_replay); in alloc_stateowner()
4227 atomic_set(&sop->so_count, 1); in alloc_stateowner()
4228 return sop; in alloc_stateowner()
6041 struct nfs4_stateowner *sop = stp->st_stateowner; in nfs4_seqid_op_checks() local
6044 status = nfsd4_check_seqid(cstate, sop, seqid); in nfs4_seqid_op_checks()
6468 static void nfs4_unhash_lockowner(struct nfs4_stateowner *sop) in nfs4_unhash_lockowner() argument
6470 unhash_lockowner_locked(lockowner(sop)); in nfs4_unhash_lockowner()
6473 static void nfs4_free_lockowner(struct nfs4_stateowner *sop) in nfs4_free_lockowner() argument
6475 struct nfs4_lockowner *lo = lockowner(sop); in nfs4_free_lockowner()
7117 struct nfs4_stateowner *sop; in nfsd4_release_lockowner() local
7137 list_for_each_entry(sop, &clp->cl_ownerstr_hashtbl[hashval], in nfsd4_release_lockowner()
7140 if (sop->so_is_open_owner || !same_owner_str(sop, owner)) in nfsd4_release_lockowner()
7143 if (atomic_read(&sop->so_count) != 1) { in nfsd4_release_lockowner()
7148 lo = lockowner(sop); in nfsd4_release_lockowner()
7149 nfs4_get_stateowner(sop); in nfsd4_release_lockowner()