Lines Matching refs:stid

86 static void nfs4_free_ol_stateid(struct nfs4_stid *stid);
940 struct nfs4_stid *stid; in nfs4_alloc_stid() local
943 stid = kmem_cache_zalloc(slab, GFP_KERNEL); in nfs4_alloc_stid()
944 if (!stid) in nfs4_alloc_stid()
950 new_id = idr_alloc_cyclic(&cl->cl_stateids, stid, 1, 0, GFP_NOWAIT); in nfs4_alloc_stid()
956 stid->sc_free = sc_free; in nfs4_alloc_stid()
957 stid->sc_client = cl; in nfs4_alloc_stid()
958 stid->sc_stateid.si_opaque.so_id = new_id; in nfs4_alloc_stid()
959 stid->sc_stateid.si_opaque.so_clid = cl->cl_clientid; in nfs4_alloc_stid()
961 refcount_set(&stid->sc_count, 1); in nfs4_alloc_stid()
962 spin_lock_init(&stid->sc_lock); in nfs4_alloc_stid()
963 INIT_LIST_HEAD(&stid->sc_cp_list); in nfs4_alloc_stid()
974 return stid; in nfs4_alloc_stid()
976 kmem_cache_free(slab, stid); in nfs4_alloc_stid()
983 static int nfs4_init_cp_state(struct nfsd_net *nn, copy_stateid_t *stid, in nfs4_init_cp_state() argument
988 stid->cs_stid.si_opaque.so_clid.cl_boot = (u32)nn->boot_time; in nfs4_init_cp_state()
989 stid->cs_stid.si_opaque.so_clid.cl_id = nn->s2s_cp_cl_id; in nfs4_init_cp_state()
993 new_id = idr_alloc_cyclic(&nn->s2s_cp_stateids, stid, 0, 0, GFP_NOWAIT); in nfs4_init_cp_state()
994 stid->cs_stid.si_opaque.so_id = new_id; in nfs4_init_cp_state()
995 stid->cs_stid.si_generation = 1; in nfs4_init_cp_state()
1000 stid->cs_type = cs_type; in nfs4_init_cp_state()
1043 static void nfs4_free_cpntf_statelist(struct net *net, struct nfs4_stid *stid) in nfs4_free_cpntf_statelist() argument
1050 while (!list_empty(&stid->sc_cp_list)) { in nfs4_free_cpntf_statelist()
1051 cps = list_first_entry(&stid->sc_cp_list, in nfs4_free_cpntf_statelist()
1060 struct nfs4_stid *stid; in nfs4_alloc_open_stateid() local
1062 stid = nfs4_alloc_stid(clp, stateid_slab, nfs4_free_ol_stateid); in nfs4_alloc_open_stateid()
1063 if (!stid) in nfs4_alloc_open_stateid()
1066 return openlockstateid(stid); in nfs4_alloc_open_stateid()
1069 static void nfs4_free_deleg(struct nfs4_stid *stid) in nfs4_free_deleg() argument
1071 struct nfs4_delegation *dp = delegstateid(stid); in nfs4_free_deleg()
1073 WARN_ON_ONCE(!list_empty(&stid->sc_cp_list)); in nfs4_free_deleg()
1077 kmem_cache_free(deleg_slab, stid); in nfs4_free_deleg()
1219 nfs4_inc_and_copy_stateid(stateid_t *dst, struct nfs4_stid *stid) in nfs4_inc_and_copy_stateid() argument
1221 stateid_t *src = &stid->sc_stateid; in nfs4_inc_and_copy_stateid()
1223 spin_lock(&stid->sc_lock); in nfs4_inc_and_copy_stateid()
1227 spin_unlock(&stid->sc_lock); in nfs4_inc_and_copy_stateid()
1484 static void nfs4_free_ol_stateid(struct nfs4_stid *stid) in nfs4_free_ol_stateid() argument
1486 struct nfs4_ol_stateid *stp = openlockstateid(stid); in nfs4_free_ol_stateid()
1492 WARN_ON(!list_empty(&stid->sc_cp_list)); in nfs4_free_ol_stateid()
1493 kmem_cache_free(stateid_slab, stid); in nfs4_free_ol_stateid()
1496 static void nfs4_free_lock_stateid(struct nfs4_stid *stid) in nfs4_free_lock_stateid() argument
1498 struct nfs4_ol_stateid *stp = openlockstateid(stid); in nfs4_free_lock_stateid()
1508 nfs4_free_ol_stateid(stid); in nfs4_free_lock_stateid()
2607 static void nfs4_show_stateid(struct seq_file *s, stateid_t *stid) in nfs4_show_stateid() argument
2609 seq_printf(s, "0x%.8x", stid->si_generation); in nfs4_show_stateid()
2610 seq_printf(s, "%12phN", &stid->si_opaque); in nfs4_show_stateid()
6433 struct nfs4_stid *stid; in nfsd4_lookup_stateid() local
6456 stid = find_stateid_by_type(cstate->clp, stateid, typemask); in nfsd4_lookup_stateid()
6457 if (!stid) in nfsd4_lookup_stateid()
6459 if ((stid->sc_type == NFS4_REVOKED_DELEG_STID) && !return_revoked) { in nfsd4_lookup_stateid()
6460 nfs4_put_stid(stid); in nfsd4_lookup_stateid()
6465 *s = stid; in nfsd4_lookup_stateid()
6579 struct nfs4_stid **stid) in find_cpntf_state() argument
6596 *stid = find_stateid_by_type(found, &cps->cp_p_stateid, in find_cpntf_state()
6598 if (*stid) in find_cpntf_state()