[PATCH v19 16/40] dept: apply timeout consideration to wait_for_completion()/complete()
Byungchul Park <[email protected]>
| Newsgroups | gmane.linux.drivers.video-input-infrastructure,gmane.linux.kernel,gmane.linux.ide,gmane.comp.file-systems.ext4,gmane.linux.kernel.mm,gmane.linux.block,gmane.linux.file-systems,gmane.comp.video.dri.devel,gmane.linux.network,gmane.linux.documentation,gmane.linux.ports.arm.kernel,gmane.linux.drivers.i2c,gmane.linux.kernel.cross-arch,gmane.linux.kernel.modules,gmane.linux.nfs,gmane.linux.kernel.rust |
|---|---|
| Message-ID | <[email protected]> |
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the consideration to wait_for_completion()/complete(). Signed-off-by: Byungchul Park <[email protected]> --- include/linux/completion.h | 4 ++-- kernel/sched/completion.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/completion.h b/include/linux/completion.h index bd2c207481d6..3200b741de28 100644 --- a/include/linux/completion.h +++ b/include/linux/completion.h @@ -41,9 +41,9 @@ do { \ */ #define init_completion_map(x, m) init_completion(x) -static inline void complete_acquire(struct completion *x) +static inline void complete_acquire(struct completion *x, long timeout) { - sdt_might_sleep_start(&x->dmap); + sdt_might_sleep_start_timeout(&x->dmap, timeout); } static inline void complete_release(struct completion *x) diff --git a/kernel/sched/completion.c b/kernel/sched/completion.c index 19ee702273c0..5e45a60ff7b3 100644 --- a/kernel/sched/completion.c +++ b/kernel/sched/completion.c @@ -115,7 +115,7 @@ __wait_for_common(struct completion *x, { might_sleep(); - complete_acquire(x); + complete_acquire(x, timeout); raw_spin_lock_irq(&x->wait.lock); timeout = do_wait_for_common(x, action, timeout, state); -- 2.17.1