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>
This commit is contained in:
Родитель
fd89d5f203
Коммит
316873c958
|
@ -114,7 +114,4 @@ int ocfs2_local_write_dquot(struct dquot *dquot);
|
|||
extern const struct dquot_operations ocfs2_quota_operations;
|
||||
extern struct quota_format_type ocfs2_quota_format;
|
||||
|
||||
int ocfs2_quota_setup(void);
|
||||
void ocfs2_quota_shutdown(void);
|
||||
|
||||
#endif /* _OCFS2_QUOTA_H */
|
||||
|
|
|
@ -63,8 +63,6 @@
|
|||
* write to gf
|
||||
*/
|
||||
|
||||
static struct workqueue_struct *ocfs2_quota_wq = NULL;
|
||||
|
||||
static void qsync_work_fn(struct work_struct *work);
|
||||
|
||||
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)
|
|||
OCFS2_QBLK_RESERVED_SPACE;
|
||||
oinfo->dqi_gi.dqi_qtree_depth = qtree_depth(&oinfo->dqi_gi);
|
||||
INIT_DELAYED_WORK(&oinfo->dqi_sync_work, qsync_work_fn);
|
||||
queue_delayed_work(ocfs2_quota_wq, &oinfo->dqi_sync_work,
|
||||
msecs_to_jiffies(oinfo->dqi_syncms));
|
||||
schedule_delayed_work(&oinfo->dqi_sync_work,
|
||||
msecs_to_jiffies(oinfo->dqi_syncms));
|
||||
|
||||
out_err:
|
||||
mlog_exit(status);
|
||||
|
@ -635,8 +633,8 @@ static void qsync_work_fn(struct work_struct *work)
|
|||
struct super_block *sb = oinfo->dqi_gqinode->i_sb;
|
||||
|
||||
dquot_scan_active(sb, ocfs2_sync_dquot_helper, oinfo->dqi_type);
|
||||
queue_delayed_work(ocfs2_quota_wq, &oinfo->dqi_sync_work,
|
||||
msecs_to_jiffies(oinfo->dqi_syncms));
|
||||
schedule_delayed_work(&oinfo->dqi_sync_work,
|
||||
msecs_to_jiffies(oinfo->dqi_syncms));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -923,20 +921,3 @@ const struct dquot_operations ocfs2_quota_operations = {
|
|||
.alloc_dquot = ocfs2_alloc_dquot,
|
||||
.destroy_dquot = ocfs2_destroy_dquot,
|
||||
};
|
||||
|
||||
int ocfs2_quota_setup(void)
|
||||
{
|
||||
ocfs2_quota_wq = create_workqueue("o2quot");
|
||||
if (!ocfs2_quota_wq)
|
||||
return -ENOMEM;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ocfs2_quota_shutdown(void)
|
||||
{
|
||||
if (ocfs2_quota_wq) {
|
||||
flush_workqueue(ocfs2_quota_wq);
|
||||
destroy_workqueue(ocfs2_quota_wq);
|
||||
ocfs2_quota_wq = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1645,16 +1645,11 @@ static int __init ocfs2_init(void)
|
|||
mlog(ML_ERROR, "Unable to create ocfs2 debugfs root.\n");
|
||||
}
|
||||
|
||||
status = ocfs2_quota_setup();
|
||||
if (status)
|
||||
goto leave;
|
||||
|
||||
ocfs2_set_locking_protocol();
|
||||
|
||||
status = register_quota_format(&ocfs2_quota_format);
|
||||
leave:
|
||||
if (status < 0) {
|
||||
ocfs2_quota_shutdown();
|
||||
ocfs2_free_mem_caches();
|
||||
exit_ocfs2_uptodate_cache();
|
||||
}
|
||||
|
@ -1671,8 +1666,6 @@ static void __exit ocfs2_exit(void)
|
|||
{
|
||||
mlog_entry_void();
|
||||
|
||||
ocfs2_quota_shutdown();
|
||||
|
||||
if (ocfs2_wq) {
|
||||
flush_workqueue(ocfs2_wq);
|
||||
destroy_workqueue(ocfs2_wq);
|
||||
|
|
Загрузка…
Ссылка в новой задаче