Skip to content

Commit 23e0813

Browse files
JunPiaoHWtorvalds
authored andcommitted
ocfs2: no need flush workqueue before destroying it
destroy_workqueue() will do flushing work for us. Link: http://lkml.kernel.org/r/59E06476.3090502@huawei.com Signed-off-by: Jun Piao <piaojun@huawei.com> Reviewed-by: Joseph Qi <jiangqi903@gmail.com> Cc: Mark Fasheh <mfasheh@versity.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent a60874f commit 23e0813

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

fs/ocfs2/dlm/dlmdomain.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,6 @@ int dlm_domain_fully_joined(struct dlm_ctxt *dlm)
394394
static void dlm_destroy_dlm_worker(struct dlm_ctxt *dlm)
395395
{
396396
if (dlm->dlm_worker) {
397-
flush_workqueue(dlm->dlm_worker);
398397
destroy_workqueue(dlm->dlm_worker);
399398
dlm->dlm_worker = NULL;
400399
}

fs/ocfs2/dlmfs/dlmfs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,6 @@ static void __exit exit_dlmfs_fs(void)
670670
{
671671
unregister_filesystem(&dlmfs_fs_type);
672672

673-
flush_workqueue(user_dlm_worker);
674673
destroy_workqueue(user_dlm_worker);
675674

676675
/*

fs/ocfs2/super.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2521,10 +2521,8 @@ static void ocfs2_delete_osb(struct ocfs2_super *osb)
25212521
/* This function assumes that the caller has the main osb resource */
25222522

25232523
/* ocfs2_initializer_super have already created this workqueue */
2524-
if (osb->ocfs2_wq) {
2525-
flush_workqueue(osb->ocfs2_wq);
2524+
if (osb->ocfs2_wq)
25262525
destroy_workqueue(osb->ocfs2_wq);
2527-
}
25282526

25292527
ocfs2_free_slot_info(osb);
25302528

0 commit comments

Comments
 (0)