Lines Matching refs:cps
88 static void _free_cpntf_state_locked(struct nfsd_net *nn, struct nfs4_cpntf_state *cps);
1003 struct nfs4_cpntf_state *cps; in nfs4_alloc_init_cpntf_state() local
1005 cps = kzalloc(sizeof(struct nfs4_cpntf_state), GFP_KERNEL); in nfs4_alloc_init_cpntf_state()
1006 if (!cps) in nfs4_alloc_init_cpntf_state()
1008 cps->cpntf_time = ktime_get_boottime_seconds(); in nfs4_alloc_init_cpntf_state()
1009 refcount_set(&cps->cp_stateid.cs_count, 1); in nfs4_alloc_init_cpntf_state()
1010 if (!nfs4_init_cp_state(nn, &cps->cp_stateid, NFS4_COPYNOTIFY_STID)) in nfs4_alloc_init_cpntf_state()
1013 list_add(&cps->cp_list, &p_stid->sc_cp_list); in nfs4_alloc_init_cpntf_state()
1015 return cps; in nfs4_alloc_init_cpntf_state()
1017 kfree(cps); in nfs4_alloc_init_cpntf_state()
1036 struct nfs4_cpntf_state *cps; in nfs4_free_cpntf_statelist() local
1042 cps = list_first_entry(&stid->sc_cp_list, in nfs4_free_cpntf_statelist()
1044 _free_cpntf_state_locked(nn, cps); in nfs4_free_cpntf_statelist()
6547 struct nfs4_cpntf_state *cps; in nfs4_laundromat() local
6559 cps = container_of(cps_t, struct nfs4_cpntf_state, cp_stateid); in nfs4_laundromat()
6560 if (cps->cp_stateid.cs_type == NFS4_COPYNOTIFY_STID && in nfs4_laundromat()
6561 state_expired(<, cps->cpntf_time)) in nfs4_laundromat()
6562 _free_cpntf_state_locked(nn, cps); in nfs4_laundromat()
6957 _free_cpntf_state_locked(struct nfsd_net *nn, struct nfs4_cpntf_state *cps) in _free_cpntf_state_locked() argument
6959 WARN_ON_ONCE(cps->cp_stateid.cs_type != NFS4_COPYNOTIFY_STID); in _free_cpntf_state_locked()
6960 if (!refcount_dec_and_test(&cps->cp_stateid.cs_count)) in _free_cpntf_state_locked()
6962 list_del(&cps->cp_list); in _free_cpntf_state_locked()
6964 cps->cp_stateid.cs_stid.si_opaque.so_id); in _free_cpntf_state_locked()
6965 kfree(cps); in _free_cpntf_state_locked()
6974 struct nfs4_cpntf_state **cps) in manage_cpntf_state() argument
7000 *cps = state; in manage_cpntf_state()
7008 struct nfs4_cpntf_state *cps = NULL; in find_cpntf_state() local
7011 status = manage_cpntf_state(nn, st, NULL, &cps); in find_cpntf_state()
7015 cps->cpntf_time = ktime_get_boottime_seconds(); in find_cpntf_state()
7018 found = lookup_clientid(&cps->cp_p_clid, true, nn); in find_cpntf_state()
7022 *stid = find_stateid_by_type(found, &cps->cp_p_stateid, in find_cpntf_state()
7032 nfs4_put_cpntf_state(nn, cps); in find_cpntf_state()
7036 void nfs4_put_cpntf_state(struct nfsd_net *nn, struct nfs4_cpntf_state *cps) in nfs4_put_cpntf_state() argument
7039 _free_cpntf_state_locked(nn, cps); in nfs4_put_cpntf_state()