diff options
author | Muchun Song <songmuchun@bytedance.com> | 2025-02-08 17:04:15 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2025-02-11 13:04:11 -0700 |
commit | 36d03cb3277e29beedb87b8efb1e4da02b26e0c0 (patch) | |
tree | a86f48d871fe9dfa3858bc8c97a52e9a3017cde5 /block/blk-iocost.c | |
parent | 3bee991f2b68175c828dc3f9c26367fe1827319a (diff) |
block: introduce init_wait_func()
There is already a macro DEFINE_WAIT_FUNC() to declare a wait_queue_entry
with a specified waking function. But there is not a counterpart for
initializing one wait_queue_entry with a specified waking function. So
introducing init_wait_func() for this, which also could be used in iocost
and rq-qos. Using default_wake_function() in rq_qos_wait() to wake up
waiters, which could remove ->task field from rq_qos_wait_data.
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20250208090416.38642-1-songmuchun@bytedance.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-iocost.c')
-rw-r--r-- | block/blk-iocost.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/block/blk-iocost.c b/block/blk-iocost.c index 65a1d4427ccf..6be46e28459b 100644 --- a/block/blk-iocost.c +++ b/block/blk-iocost.c @@ -2718,8 +2718,7 @@ retry_lock: * All waiters are on iocg->waitq and the wait states are * synchronized using waitq.lock. */ - init_waitqueue_func_entry(&wait.wait, iocg_wake_fn); - wait.wait.private = current; + init_wait_func(&wait.wait, iocg_wake_fn); wait.bio = bio; wait.abs_cost = abs_cost; wait.committed = false; /* will be set true by waker */ |