diff options
author | Tejun Heo <tj@kernel.org> | 2011-02-01 05:42:42 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2011-02-01 05:42:42 -0500 |
commit | 316873c958eee302952edcadb8dc72d6d3d19d3c (patch) | |
tree | 9d9194ca6df360f6df1cfd6de13ab6e1e36d6501 /fs/ocfs2/quota_global.c | |
parent | fd89d5f2030ac83324330bfd0bc73abf1beadaa6 (diff) |
ocfs2: use system_wq instead of ocfs2_quota_wq
ocfs2_quota_wq is not depended upon during memory reclaim and, with
cmwq, there's no reason to use a dedicated workqueue. Drop
ocfs2_quota_wq and use system_wq instead. dqi_sync_work is already
sync canceled on quota disable and no further synchronization is
necessary.
This change makes ocfs2_quota_setup/shutdown() noops. Both functions
removed.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/quota_global.c')
-rw-r--r-- | fs/ocfs2/quota_global.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c index 4607923eb24c..a73f64166481 100644 --- a/fs/ocfs2/quota_global.c +++ b/fs/ocfs2/quota_global.c | |||
@@ -63,8 +63,6 @@ | |||
63 | * write to gf | 63 | * write to gf |
64 | */ | 64 | */ |
65 | 65 | ||
66 | static struct workqueue_struct *ocfs2_quota_wq = NULL; | ||
67 | |||
68 | static void qsync_work_fn(struct work_struct *work); | 66 | static void qsync_work_fn(struct work_struct *work); |
69 | 67 | ||
70 | static void ocfs2_global_disk2memdqb(struct dquot *dquot, void *dp) | 68 | static void ocfs2_global_disk2memdqb(struct dquot *dquot, void *dp) |
@@ -400,8 +398,8 @@ int ocfs2_global_read_info(struct super_block *sb, int type) | |||
400 | OCFS2_QBLK_RESERVED_SPACE; | 398 | OCFS2_QBLK_RESERVED_SPACE; |
401 | oinfo->dqi_gi.dqi_qtree_depth = qtree_depth(&oinfo->dqi_gi); | 399 | oinfo->dqi_gi.dqi_qtree_depth = qtree_depth(&oinfo->dqi_gi); |
402 | INIT_DELAYED_WORK(&oinfo->dqi_sync_work, qsync_work_fn); | 400 | INIT_DELAYED_WORK(&oinfo->dqi_sync_work, qsync_work_fn); |
403 | queue_delayed_work(ocfs2_quota_wq, &oinfo->dqi_sync_work, | 401 | schedule_delayed_work(&oinfo->dqi_sync_work, |
404 | msecs_to_jiffies(oinfo->dqi_syncms)); | 402 | msecs_to_jiffies(oinfo->dqi_syncms)); |
405 | 403 | ||
406 | out_err: | 404 | out_err: |
407 | mlog_exit(status); | 405 | mlog_exit(status); |
@@ -635,8 +633,8 @@ static void qsync_work_fn(struct work_struct *work) | |||
635 | struct super_block *sb = oinfo->dqi_gqinode->i_sb; | 633 | struct super_block *sb = oinfo->dqi_gqinode->i_sb; |
636 | 634 | ||
637 | dquot_scan_active(sb, ocfs2_sync_dquot_helper, oinfo->dqi_type); | 635 | dquot_scan_active(sb, ocfs2_sync_dquot_helper, oinfo->dqi_type); |
638 | queue_delayed_work(ocfs2_quota_wq, &oinfo->dqi_sync_work, | 636 | schedule_delayed_work(&oinfo->dqi_sync_work, |
639 | msecs_to_jiffies(oinfo->dqi_syncms)); | 637 | msecs_to_jiffies(oinfo->dqi_syncms)); |
640 | } | 638 | } |
641 | 639 | ||
642 | /* | 640 | /* |
@@ -923,20 +921,3 @@ const struct dquot_operations ocfs2_quota_operations = { | |||
923 | .alloc_dquot = ocfs2_alloc_dquot, | 921 | .alloc_dquot = ocfs2_alloc_dquot, |
924 | .destroy_dquot = ocfs2_destroy_dquot, | 922 | .destroy_dquot = ocfs2_destroy_dquot, |
925 | }; | 923 | }; |
926 | |||
927 | int ocfs2_quota_setup(void) | ||
928 | { | ||
929 | ocfs2_quota_wq = create_workqueue("o2quot"); | ||
930 | if (!ocfs2_quota_wq) | ||
931 | return -ENOMEM; | ||
932 | return 0; | ||
933 | } | ||
934 | |||
935 | void ocfs2_quota_shutdown(void) | ||
936 | { | ||
937 | if (ocfs2_quota_wq) { | ||
938 | flush_workqueue(ocfs2_quota_wq); | ||
939 | destroy_workqueue(ocfs2_quota_wq); | ||
940 | ocfs2_quota_wq = NULL; | ||
941 | } | ||
942 | } | ||