diff options
Diffstat (limited to 'drivers/md/dm-mpath.c')
-rw-r--r-- | drivers/md/dm-mpath.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index aa009e865871..ebfa411d1a7d 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c | |||
@@ -445,11 +445,11 @@ static int queue_if_no_path(struct multipath *m, unsigned queue_if_no_path, | |||
445 | else | 445 | else |
446 | m->saved_queue_if_no_path = queue_if_no_path; | 446 | m->saved_queue_if_no_path = queue_if_no_path; |
447 | m->queue_if_no_path = queue_if_no_path; | 447 | m->queue_if_no_path = queue_if_no_path; |
448 | if (!m->queue_if_no_path) | ||
449 | dm_table_run_md_queue_async(m->ti->table); | ||
450 | |||
451 | spin_unlock_irqrestore(&m->lock, flags); | 448 | spin_unlock_irqrestore(&m->lock, flags); |
452 | 449 | ||
450 | if (!queue_if_no_path) | ||
451 | dm_table_run_md_queue_async(m->ti->table); | ||
452 | |||
453 | return 0; | 453 | return 0; |
454 | } | 454 | } |
455 | 455 | ||
@@ -954,7 +954,7 @@ out: | |||
954 | */ | 954 | */ |
955 | static int reinstate_path(struct pgpath *pgpath) | 955 | static int reinstate_path(struct pgpath *pgpath) |
956 | { | 956 | { |
957 | int r = 0; | 957 | int r = 0, run_queue = 0; |
958 | unsigned long flags; | 958 | unsigned long flags; |
959 | struct multipath *m = pgpath->pg->m; | 959 | struct multipath *m = pgpath->pg->m; |
960 | 960 | ||
@@ -978,7 +978,7 @@ static int reinstate_path(struct pgpath *pgpath) | |||
978 | 978 | ||
979 | if (!m->nr_valid_paths++) { | 979 | if (!m->nr_valid_paths++) { |
980 | m->current_pgpath = NULL; | 980 | m->current_pgpath = NULL; |
981 | dm_table_run_md_queue_async(m->ti->table); | 981 | run_queue = 1; |
982 | } else if (m->hw_handler_name && (m->current_pg == pgpath->pg)) { | 982 | } else if (m->hw_handler_name && (m->current_pg == pgpath->pg)) { |
983 | if (queue_work(kmpath_handlerd, &pgpath->activate_path.work)) | 983 | if (queue_work(kmpath_handlerd, &pgpath->activate_path.work)) |
984 | m->pg_init_in_progress++; | 984 | m->pg_init_in_progress++; |
@@ -991,6 +991,8 @@ static int reinstate_path(struct pgpath *pgpath) | |||
991 | 991 | ||
992 | out: | 992 | out: |
993 | spin_unlock_irqrestore(&m->lock, flags); | 993 | spin_unlock_irqrestore(&m->lock, flags); |
994 | if (run_queue) | ||
995 | dm_table_run_md_queue_async(m->ti->table); | ||
994 | 996 | ||
995 | return r; | 997 | return r; |
996 | } | 998 | } |