aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r--fs/nfsd/nfs4state.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 2a5f00b0ee99..9bec088e7657 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1844,6 +1844,7 @@ out:
1844 return status; 1844 return status;
1845} 1845}
1846 1846
1847static struct workqueue_struct *laundry_wq;
1847static struct work_struct laundromat_work; 1848static struct work_struct laundromat_work;
1848static void laundromat_main(void *); 1849static void laundromat_main(void *);
1849static DECLARE_WORK(laundromat_work, laundromat_main, NULL); 1850static DECLARE_WORK(laundromat_work, laundromat_main, NULL);
@@ -1951,7 +1952,7 @@ laundromat_main(void *not_used)
1951 1952
1952 t = nfs4_laundromat(); 1953 t = nfs4_laundromat();
1953 dprintk("NFSD: laundromat_main - sleeping for %ld seconds\n", t); 1954 dprintk("NFSD: laundromat_main - sleeping for %ld seconds\n", t);
1954 schedule_delayed_work(&laundromat_work, t*HZ); 1955 queue_delayed_work(laundry_wq, &laundromat_work, t*HZ);
1955} 1956}
1956 1957
1957/* search ownerid_hashtbl[] and close_lru for stateid owner 1958/* search ownerid_hashtbl[] and close_lru for stateid owner
@@ -3211,7 +3212,8 @@ __nfs4_state_init(void)
3211 printk("NFSD: starting %ld-second grace period\n", grace_time); 3212 printk("NFSD: starting %ld-second grace period\n", grace_time);
3212 grace_end = boot_time + grace_time; 3213 grace_end = boot_time + grace_time;
3213 INIT_WORK(&laundromat_work,laundromat_main, NULL); 3214 INIT_WORK(&laundromat_work,laundromat_main, NULL);
3214 schedule_delayed_work(&laundromat_work, NFSD_LEASE_TIME*HZ); 3215 laundry_wq = create_singlethread_workqueue("nfsd4");
3216 queue_delayed_work(laundry_wq, &laundromat_work, NFSD_LEASE_TIME*HZ);
3215} 3217}
3216 3218
3217int 3219int
@@ -3287,7 +3289,8 @@ __nfs4_state_shutdown(void)
3287 } 3289 }
3288 3290
3289 cancel_delayed_work(&laundromat_work); 3291 cancel_delayed_work(&laundromat_work);
3290 flush_scheduled_work(); 3292 flush_workqueue(laundry_wq);
3293 destroy_workqueue(laundry_wq);
3291 nfs4_init = 0; 3294 nfs4_init = 0;
3292} 3295}
3293 3296