@@ -974,19 +974,19 @@ struct nfs4_stid *nfs4_alloc_stid(struct nfs4_client *cl, struct kmem_cache *sla
974974 * Create a unique stateid_t to represent each COPY.
975975 */
976976static int nfs4_init_cp_state (struct nfsd_net * nn , copy_stateid_t * stid ,
977- unsigned char sc_type )
977+ unsigned char cs_type )
978978{
979979 int new_id ;
980980
981- stid -> stid .si_opaque .so_clid .cl_boot = (u32 )nn -> boot_time ;
982- stid -> stid .si_opaque .so_clid .cl_id = nn -> s2s_cp_cl_id ;
983- stid -> sc_type = sc_type ;
981+ stid -> cs_stid .si_opaque .so_clid .cl_boot = (u32 )nn -> boot_time ;
982+ stid -> cs_stid .si_opaque .so_clid .cl_id = nn -> s2s_cp_cl_id ;
983+ stid -> cs_type = cs_type ;
984984
985985 idr_preload (GFP_KERNEL );
986986 spin_lock (& nn -> s2s_cp_lock );
987987 new_id = idr_alloc_cyclic (& nn -> s2s_cp_stateids , stid , 0 , 0 , GFP_NOWAIT );
988- stid -> stid .si_opaque .so_id = new_id ;
989- stid -> stid .si_generation = 1 ;
988+ stid -> cs_stid .si_opaque .so_id = new_id ;
989+ stid -> cs_stid .si_generation = 1 ;
990990 spin_unlock (& nn -> s2s_cp_lock );
991991 idr_preload_end ();
992992 if (new_id < 0 )
@@ -1008,7 +1008,7 @@ struct nfs4_cpntf_state *nfs4_alloc_init_cpntf_state(struct nfsd_net *nn,
10081008 if (!cps )
10091009 return NULL ;
10101010 cps -> cpntf_time = ktime_get_boottime_seconds ();
1011- refcount_set (& cps -> cp_stateid .sc_count , 1 );
1011+ refcount_set (& cps -> cp_stateid .cs_count , 1 );
10121012 if (!nfs4_init_cp_state (nn , & cps -> cp_stateid , NFS4_COPYNOTIFY_STID ))
10131013 goto out_free ;
10141014 spin_lock (& nn -> s2s_cp_lock );
@@ -1024,11 +1024,11 @@ void nfs4_free_copy_state(struct nfsd4_copy *copy)
10241024{
10251025 struct nfsd_net * nn ;
10261026
1027- WARN_ON_ONCE (copy -> cp_stateid .sc_type != NFS4_COPY_STID );
1027+ WARN_ON_ONCE (copy -> cp_stateid .cs_type != NFS4_COPY_STID );
10281028 nn = net_generic (copy -> cp_clp -> net , nfsd_net_id );
10291029 spin_lock (& nn -> s2s_cp_lock );
10301030 idr_remove (& nn -> s2s_cp_stateids ,
1031- copy -> cp_stateid .stid .si_opaque .so_id );
1031+ copy -> cp_stateid .cs_stid .si_opaque .so_id );
10321032 spin_unlock (& nn -> s2s_cp_lock );
10331033}
10341034
@@ -6027,7 +6027,7 @@ nfs4_laundromat(struct nfsd_net *nn)
60276027 spin_lock (& nn -> s2s_cp_lock );
60286028 idr_for_each_entry (& nn -> s2s_cp_stateids , cps_t , i ) {
60296029 cps = container_of (cps_t , struct nfs4_cpntf_state , cp_stateid );
6030- if (cps -> cp_stateid .sc_type == NFS4_COPYNOTIFY_STID &&
6030+ if (cps -> cp_stateid .cs_type == NFS4_COPYNOTIFY_STID &&
60316031 state_expired (& lt , cps -> cpntf_time ))
60326032 _free_cpntf_state_locked (nn , cps );
60336033 }
@@ -6359,12 +6359,12 @@ nfs4_check_file(struct svc_rqst *rqstp, struct svc_fh *fhp, struct nfs4_stid *s,
63596359static void
63606360_free_cpntf_state_locked (struct nfsd_net * nn , struct nfs4_cpntf_state * cps )
63616361{
6362- WARN_ON_ONCE (cps -> cp_stateid .sc_type != NFS4_COPYNOTIFY_STID );
6363- if (!refcount_dec_and_test (& cps -> cp_stateid .sc_count ))
6362+ WARN_ON_ONCE (cps -> cp_stateid .cs_type != NFS4_COPYNOTIFY_STID );
6363+ if (!refcount_dec_and_test (& cps -> cp_stateid .cs_count ))
63646364 return ;
63656365 list_del (& cps -> cp_list );
63666366 idr_remove (& nn -> s2s_cp_stateids ,
6367- cps -> cp_stateid .stid .si_opaque .so_id );
6367+ cps -> cp_stateid .cs_stid .si_opaque .so_id );
63686368 kfree (cps );
63696369}
63706370/*
@@ -6386,12 +6386,12 @@ __be32 manage_cpntf_state(struct nfsd_net *nn, stateid_t *st,
63866386 if (cps_t ) {
63876387 state = container_of (cps_t , struct nfs4_cpntf_state ,
63886388 cp_stateid );
6389- if (state -> cp_stateid .sc_type != NFS4_COPYNOTIFY_STID ) {
6389+ if (state -> cp_stateid .cs_type != NFS4_COPYNOTIFY_STID ) {
63906390 state = NULL ;
63916391 goto unlock ;
63926392 }
63936393 if (!clp )
6394- refcount_inc (& state -> cp_stateid .sc_count );
6394+ refcount_inc (& state -> cp_stateid .cs_count );
63956395 else
63966396 _free_cpntf_state_locked (nn , state );
63976397 }
0 commit comments