@@ -4361,7 +4361,7 @@ nfsd4_init_slabs(void)
4361
4361
}
4362
4362
4363
4363
static unsigned long
4364
- nfsd_courtesy_client_count (struct shrinker * shrink , struct shrink_control * sc )
4364
+ nfsd4_state_shrinker_count (struct shrinker * shrink , struct shrink_control * sc )
4365
4365
{
4366
4366
int cnt ;
4367
4367
struct nfsd_net * nn = container_of (shrink ,
@@ -4374,7 +4374,7 @@ nfsd_courtesy_client_count(struct shrinker *shrink, struct shrink_control *sc)
4374
4374
}
4375
4375
4376
4376
static unsigned long
4377
- nfsd_courtesy_client_scan (struct shrinker * shrink , struct shrink_control * sc )
4377
+ nfsd4_state_shrinker_scan (struct shrinker * shrink , struct shrink_control * sc )
4378
4378
{
4379
4379
return SHRINK_STOP ;
4380
4380
}
@@ -4401,8 +4401,8 @@ nfsd4_init_leases_net(struct nfsd_net *nn)
4401
4401
nn -> nfs4_max_clients = max_t (int , max_clients , NFS4_CLIENTS_PER_GB );
4402
4402
4403
4403
atomic_set (& nn -> nfsd_courtesy_clients , 0 );
4404
- nn -> nfsd_client_shrinker .scan_objects = nfsd_courtesy_client_scan ;
4405
- nn -> nfsd_client_shrinker .count_objects = nfsd_courtesy_client_count ;
4404
+ nn -> nfsd_client_shrinker .scan_objects = nfsd4_state_shrinker_scan ;
4405
+ nn -> nfsd_client_shrinker .count_objects = nfsd4_state_shrinker_count ;
4406
4406
nn -> nfsd_client_shrinker .seeks = DEFAULT_SEEKS ;
4407
4407
return register_shrinker (& nn -> nfsd_client_shrinker , "nfsd-client" );
4408
4408
}
@@ -6151,17 +6151,24 @@ laundromat_main(struct work_struct *laundry)
6151
6151
}
6152
6152
6153
6153
static void
6154
- courtesy_client_reaper (struct work_struct * reaper )
6154
+ courtesy_client_reaper (struct nfsd_net * nn )
6155
6155
{
6156
6156
struct list_head reaplist ;
6157
- struct delayed_work * dwork = to_delayed_work (reaper );
6158
- struct nfsd_net * nn = container_of (dwork , struct nfsd_net ,
6159
- nfsd_shrinker_work );
6160
6157
6161
6158
nfs4_get_courtesy_client_reaplist (nn , & reaplist );
6162
6159
nfs4_process_client_reaplist (& reaplist );
6163
6160
}
6164
6161
6162
+ static void
6163
+ nfsd4_state_shrinker_worker (struct work_struct * work )
6164
+ {
6165
+ struct delayed_work * dwork = to_delayed_work (work );
6166
+ struct nfsd_net * nn = container_of (dwork , struct nfsd_net ,
6167
+ nfsd_shrinker_work );
6168
+
6169
+ courtesy_client_reaper (nn );
6170
+ }
6171
+
6165
6172
static inline __be32 nfs4_check_fh (struct svc_fh * fhp , struct nfs4_stid * stp )
6166
6173
{
6167
6174
if (!fh_match (& fhp -> fh_handle , & stp -> sc_file -> fi_fhandle ))
@@ -7985,7 +7992,7 @@ static int nfs4_state_create_net(struct net *net)
7985
7992
INIT_LIST_HEAD (& nn -> blocked_locks_lru );
7986
7993
7987
7994
INIT_DELAYED_WORK (& nn -> laundromat_work , laundromat_main );
7988
- INIT_DELAYED_WORK (& nn -> nfsd_shrinker_work , courtesy_client_reaper );
7995
+ INIT_DELAYED_WORK (& nn -> nfsd_shrinker_work , nfsd4_state_shrinker_worker );
7989
7996
get_net (net );
7990
7997
7991
7998
return 0 ;
0 commit comments