diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 11:20:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 11:20:19 -0400 |
commit | bd2895eeade5f11f3e5906283c630bbdb4b57454 (patch) | |
tree | 4d98f4fcd80c7d062afce28823d08aee53e66f82 /fs/ocfs2 | |
parent | 016aa2ed1cc9cf704cf76d8df07751b6daa9750f (diff) | |
parent | 24d51add7438f9696a7205927bf9de3c5c787a58 (diff) |
Merge branch 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
* 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
workqueue: fix build failure introduced by s/freezeable/freezable/
workqueue: add system_freezeable_wq
rds/ib: use system_wq instead of rds_ib_fmr_wq
net/9p: replace p9_poll_task with a work
net/9p: use system_wq instead of p9_mux_wq
xfs: convert to alloc_workqueue()
reiserfs: make commit_wq use the default concurrency level
ocfs2: use system_wq instead of ocfs2_quota_wq
ext4: convert to alloc_workqueue()
scsi/scsi_tgt_lib: scsi_tgtd isn't used in memory reclaim path
scsi/be2iscsi,qla2xxx: convert to alloc_workqueue()
misc/iwmc3200top: use system_wq instead of dedicated workqueues
i2o: use alloc_workqueue() instead of create_workqueue()
acpi: kacpi*_wq don't need WQ_MEM_RECLAIM
fs/aio: aio_wq isn't used in memory reclaim path
input/tps6507x-ts: use system_wq instead of dedicated workqueue
cpufreq: use system_wq instead of dedicated workqueues
wireless/ipw2x00: use system_wq instead of dedicated workqueues
arm/omap: use system_wq in mailbox
workqueue: use WQ_MEM_RECLAIM instead of WQ_RESCUER
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/quota.h | 3 | ||||
-rw-r--r-- | fs/ocfs2/quota_global.c | 27 | ||||
-rw-r--r-- | fs/ocfs2/super.c | 7 |
3 files changed, 4 insertions, 33 deletions
diff --git a/fs/ocfs2/quota.h b/fs/ocfs2/quota.h index 196fcb52d95d..d5ab56cbe5c5 100644 --- a/fs/ocfs2/quota.h +++ b/fs/ocfs2/quota.h | |||
@@ -114,7 +114,4 @@ int ocfs2_local_write_dquot(struct dquot *dquot); | |||
114 | extern const struct dquot_operations ocfs2_quota_operations; | 114 | extern const struct dquot_operations ocfs2_quota_operations; |
115 | extern struct quota_format_type ocfs2_quota_format; | 115 | extern struct quota_format_type ocfs2_quota_format; |
116 | 116 | ||
117 | int ocfs2_quota_setup(void); | ||
118 | void ocfs2_quota_shutdown(void); | ||
119 | |||
120 | #endif /* _OCFS2_QUOTA_H */ | 117 | #endif /* _OCFS2_QUOTA_H */ |
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 | } | ||
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 36c423fb0635..236ed1bdca2c 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -1657,16 +1657,11 @@ static int __init ocfs2_init(void) | |||
1657 | mlog(ML_ERROR, "Unable to create ocfs2 debugfs root.\n"); | 1657 | mlog(ML_ERROR, "Unable to create ocfs2 debugfs root.\n"); |
1658 | } | 1658 | } |
1659 | 1659 | ||
1660 | status = ocfs2_quota_setup(); | ||
1661 | if (status) | ||
1662 | goto leave; | ||
1663 | |||
1664 | ocfs2_set_locking_protocol(); | 1660 | ocfs2_set_locking_protocol(); |
1665 | 1661 | ||
1666 | status = register_quota_format(&ocfs2_quota_format); | 1662 | status = register_quota_format(&ocfs2_quota_format); |
1667 | leave: | 1663 | leave: |
1668 | if (status < 0) { | 1664 | if (status < 0) { |
1669 | ocfs2_quota_shutdown(); | ||
1670 | ocfs2_free_mem_caches(); | 1665 | ocfs2_free_mem_caches(); |
1671 | exit_ocfs2_uptodate_cache(); | 1666 | exit_ocfs2_uptodate_cache(); |
1672 | } | 1667 | } |
@@ -1683,8 +1678,6 @@ static void __exit ocfs2_exit(void) | |||
1683 | { | 1678 | { |
1684 | mlog_entry_void(); | 1679 | mlog_entry_void(); |
1685 | 1680 | ||
1686 | ocfs2_quota_shutdown(); | ||
1687 | |||
1688 | if (ocfs2_wq) { | 1681 | if (ocfs2_wq) { |
1689 | flush_workqueue(ocfs2_wq); | 1682 | flush_workqueue(ocfs2_wq); |
1690 | destroy_workqueue(ocfs2_wq); | 1683 | destroy_workqueue(ocfs2_wq); |