Lines Matching refs:stid
82 static void nfs4_free_ol_stateid(struct nfs4_stid *stid);
727 struct nfs4_stid *stid;
730 stid = kmem_cache_zalloc(slab, GFP_KERNEL);
731 if (!stid)
737 new_id = idr_alloc_cyclic(&cl->cl_stateids, stid, 1, 0, GFP_NOWAIT);
743 stid->sc_free = sc_free;
744 stid->sc_client = cl;
745 stid->sc_stateid.si_opaque.so_id = new_id;
746 stid->sc_stateid.si_opaque.so_clid = cl->cl_clientid;
748 refcount_set(&stid->sc_count, 1);
749 spin_lock_init(&stid->sc_lock);
750 INIT_LIST_HEAD(&stid->sc_cp_list);
761 return stid;
763 kmem_cache_free(slab, stid);
770 static int nfs4_init_cp_state(struct nfsd_net *nn, copy_stateid_t *stid,
775 stid->stid.si_opaque.so_clid.cl_boot = (u32)nn->boot_time;
776 stid->stid.si_opaque.so_clid.cl_id = nn->s2s_cp_cl_id;
777 stid->sc_type = sc_type;
781 new_id = idr_alloc_cyclic(&nn->s2s_cp_stateids, stid, 0, 0, GFP_NOWAIT);
782 stid->stid.si_opaque.so_id = new_id;
783 stid->stid.si_generation = 1;
825 copy->cp_stateid.stid.si_opaque.so_id);
829 static void nfs4_free_cpntf_statelist(struct net *net, struct nfs4_stid *stid)
836 while (!list_empty(&stid->sc_cp_list)) {
837 cps = list_first_entry(&stid->sc_cp_list,
846 struct nfs4_stid *stid;
848 stid = nfs4_alloc_stid(clp, stateid_slab, nfs4_free_ol_stateid);
849 if (!stid)
852 return openlockstateid(stid);
855 static void nfs4_free_deleg(struct nfs4_stid *stid)
857 WARN_ON(!list_empty(&stid->sc_cp_list));
858 kmem_cache_free(deleg_slab, stid);
1000 nfs4_inc_and_copy_stateid(stateid_t *dst, struct nfs4_stid *stid)
1002 stateid_t *src = &stid->sc_stateid;
1004 spin_lock(&stid->sc_lock);
1008 spin_unlock(&stid->sc_lock);
1365 static void nfs4_free_ol_stateid(struct nfs4_stid *stid)
1367 struct nfs4_ol_stateid *stp = openlockstateid(stid);
1373 WARN_ON(!list_empty(&stid->sc_cp_list));
1374 kmem_cache_free(stateid_slab, stid);
1377 static void nfs4_free_lock_stateid(struct nfs4_stid *stid)
1379 struct nfs4_ol_stateid *stp = openlockstateid(stid);
1389 nfs4_free_ol_stateid(stid);
2457 static void nfs4_show_stateid(struct seq_file *s, stateid_t *stid)
2459 seq_printf(s, "0x%.8x", stid->si_generation);
2460 seq_printf(s, "%12phN", &stid->si_opaque);
5796 cps->cp_stateid.stid.si_opaque.so_id);
5837 struct nfs4_stid **stid)
5854 stid, nn);