Skip to content

Commit ffb7c8e

Browse files
Sebastian Andrzej Siewiorjnettlet
authored andcommitted
Revert "block: blk-mq: Use swait"
This reverts commit "block: blk-mq: Use swait". The issue remains but will be fixed differently. Cc: stable-rt@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> (cherry-picked from ca3fd6c) Signed-off-by: Julia Cartwright <julia@ni.com>
1 parent 32172fb commit ffb7c8e

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

block/blk-core.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -662,9 +662,9 @@ int blk_queue_enter(struct request_queue *q, bool nowait)
662662
if (nowait)
663663
return -EBUSY;
664664

665-
swait_event(q->mq_freeze_wq,
666-
!atomic_read(&q->mq_freeze_depth) ||
667-
blk_queue_dying(q));
665+
wait_event(q->mq_freeze_wq,
666+
!atomic_read(&q->mq_freeze_depth) ||
667+
blk_queue_dying(q));
668668
if (blk_queue_dying(q))
669669
return -ENODEV;
670670
}
@@ -680,7 +680,7 @@ static void blk_queue_usage_counter_release(struct percpu_ref *ref)
680680
struct request_queue *q =
681681
container_of(ref, struct request_queue, q_usage_counter);
682682

683-
swake_up_all(&q->mq_freeze_wq);
683+
wake_up_all(&q->mq_freeze_wq);
684684
}
685685

686686
static void blk_rq_timed_out_timer(unsigned long data)
@@ -750,7 +750,7 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id)
750750
q->bypass_depth = 1;
751751
__set_bit(QUEUE_FLAG_BYPASS, &q->queue_flags);
752752

753-
init_swait_queue_head(&q->mq_freeze_wq);
753+
init_waitqueue_head(&q->mq_freeze_wq);
754754

755755
/*
756756
* Init percpu_ref in atomic mode so that it's faster to shutdown.

block/blk-mq.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ EXPORT_SYMBOL_GPL(blk_mq_freeze_queue_start);
7272

7373
static void blk_mq_freeze_queue_wait(struct request_queue *q)
7474
{
75-
swait_event(q->mq_freeze_wq, percpu_ref_is_zero(&q->q_usage_counter));
75+
wait_event(q->mq_freeze_wq, percpu_ref_is_zero(&q->q_usage_counter));
7676
}
7777

7878
/*
@@ -110,7 +110,7 @@ void blk_mq_unfreeze_queue(struct request_queue *q)
110110
WARN_ON_ONCE(freeze_depth < 0);
111111
if (!freeze_depth) {
112112
percpu_ref_reinit(&q->q_usage_counter);
113-
swake_up_all(&q->mq_freeze_wq);
113+
wake_up_all(&q->mq_freeze_wq);
114114
}
115115
}
116116
EXPORT_SYMBOL_GPL(blk_mq_unfreeze_queue);
@@ -129,7 +129,7 @@ void blk_mq_wake_waiters(struct request_queue *q)
129129
* dying, we need to ensure that processes currently waiting on
130130
* the queue are notified as well.
131131
*/
132-
swake_up_all(&q->mq_freeze_wq);
132+
wake_up_all(&q->mq_freeze_wq);
133133
}
134134

135135
bool blk_mq_can_queue(struct blk_mq_hw_ctx *hctx)

include/linux/blkdev.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ struct request_queue {
468468
struct throtl_data *td;
469469
#endif
470470
struct rcu_head rcu_head;
471-
struct swait_queue_head mq_freeze_wq;
471+
wait_queue_head_t mq_freeze_wq;
472472
struct percpu_ref q_usage_counter;
473473
struct list_head all_q_node;
474474

0 commit comments

Comments
 (0)