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