Lines Matching refs:stid
82 static void nfs4_free_ol_stateid(struct nfs4_stid *stid);
716 struct nfs4_stid *stid; in nfs4_alloc_stid() local
719 stid = kmem_cache_zalloc(slab, GFP_KERNEL); in nfs4_alloc_stid()
720 if (!stid) in nfs4_alloc_stid()
726 new_id = idr_alloc_cyclic(&cl->cl_stateids, stid, 1, 0, GFP_NOWAIT); in nfs4_alloc_stid()
732 stid->sc_free = sc_free; in nfs4_alloc_stid()
733 stid->sc_client = cl; in nfs4_alloc_stid()
734 stid->sc_stateid.si_opaque.so_id = new_id; in nfs4_alloc_stid()
735 stid->sc_stateid.si_opaque.so_clid = cl->cl_clientid; in nfs4_alloc_stid()
737 refcount_set(&stid->sc_count, 1); in nfs4_alloc_stid()
738 spin_lock_init(&stid->sc_lock); in nfs4_alloc_stid()
739 INIT_LIST_HEAD(&stid->sc_cp_list); in nfs4_alloc_stid()
750 return stid; in nfs4_alloc_stid()
752 kmem_cache_free(slab, stid); in nfs4_alloc_stid()
759 static int nfs4_init_cp_state(struct nfsd_net *nn, copy_stateid_t *stid, in nfs4_init_cp_state() argument
764 stid->stid.si_opaque.so_clid.cl_boot = (u32)nn->boot_time; in nfs4_init_cp_state()
765 stid->stid.si_opaque.so_clid.cl_id = nn->s2s_cp_cl_id; in nfs4_init_cp_state()
766 stid->sc_type = sc_type; in nfs4_init_cp_state()
770 new_id = idr_alloc_cyclic(&nn->s2s_cp_stateids, stid, 0, 0, GFP_NOWAIT); in nfs4_init_cp_state()
771 stid->stid.si_opaque.so_id = new_id; in nfs4_init_cp_state()
772 stid->stid.si_generation = 1; in nfs4_init_cp_state()
814 copy->cp_stateid.stid.si_opaque.so_id); in nfs4_free_copy_state()
818 static void nfs4_free_cpntf_statelist(struct net *net, struct nfs4_stid *stid) in nfs4_free_cpntf_statelist() argument
825 while (!list_empty(&stid->sc_cp_list)) { in nfs4_free_cpntf_statelist()
826 cps = list_first_entry(&stid->sc_cp_list, in nfs4_free_cpntf_statelist()
835 struct nfs4_stid *stid; in nfs4_alloc_open_stateid() local
837 stid = nfs4_alloc_stid(clp, stateid_slab, nfs4_free_ol_stateid); in nfs4_alloc_open_stateid()
838 if (!stid) in nfs4_alloc_open_stateid()
841 return openlockstateid(stid); in nfs4_alloc_open_stateid()
844 static void nfs4_free_deleg(struct nfs4_stid *stid) in nfs4_free_deleg() argument
846 WARN_ON(!list_empty(&stid->sc_cp_list)); in nfs4_free_deleg()
847 kmem_cache_free(deleg_slab, stid); in nfs4_free_deleg()
989 nfs4_inc_and_copy_stateid(stateid_t *dst, struct nfs4_stid *stid) in nfs4_inc_and_copy_stateid() argument
991 stateid_t *src = &stid->sc_stateid; in nfs4_inc_and_copy_stateid()
993 spin_lock(&stid->sc_lock); in nfs4_inc_and_copy_stateid()
997 spin_unlock(&stid->sc_lock); in nfs4_inc_and_copy_stateid()
1354 static void nfs4_free_ol_stateid(struct nfs4_stid *stid) in nfs4_free_ol_stateid() argument
1356 struct nfs4_ol_stateid *stp = openlockstateid(stid); in nfs4_free_ol_stateid()
1362 WARN_ON(!list_empty(&stid->sc_cp_list)); in nfs4_free_ol_stateid()
1363 kmem_cache_free(stateid_slab, stid); in nfs4_free_ol_stateid()
1366 static void nfs4_free_lock_stateid(struct nfs4_stid *stid) in nfs4_free_lock_stateid() argument
1368 struct nfs4_ol_stateid *stp = openlockstateid(stid); in nfs4_free_lock_stateid()
1378 nfs4_free_ol_stateid(stid); in nfs4_free_lock_stateid()
2446 static void nfs4_show_stateid(struct seq_file *s, stateid_t *stid) in nfs4_show_stateid() argument
2448 seq_printf(s, "0x%.8x", stid->si_generation); in nfs4_show_stateid()
2449 seq_printf(s, "%12phN", &stid->si_opaque); in nfs4_show_stateid()
5783 cps->cp_stateid.stid.si_opaque.so_id); in _free_cpntf_state_locked()
5824 struct nfs4_stid **stid) in find_cpntf_state() argument
5841 stid, nn); in find_cpntf_state()