From fd8185e9c945c3a3994273532d2fe3cc9c533e0a Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Tue, 23 Aug 2022 16:45:29 +0200 Subject: [PATCH] copy: use new smp waiting --- kernel/mars_copy.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/kernel/mars_copy.c b/kernel/mars_copy.c index 9801f606..ee8c36df 100644 --- a/kernel/mars_copy.c +++ b/kernel/mars_copy.c @@ -32,6 +32,7 @@ #include #include +#include "brick_wait.h" #include "mars.h" #include "lib_limiter.h" @@ -98,7 +99,7 @@ void _clash(struct copy_brick *brick) set_bit(0, &brick->clash); atomic_inc(&brick->total_clash_count); WRITE_ONCE(brick->trigger, true); - wake_up_interruptible(&brick->event); + brick_wake_smp(&brick->event); } static inline @@ -299,7 +300,7 @@ exit: atomic_dec(&global_copy_read_flight); } WRITE_ONCE(brick->trigger, true); - wake_up_interruptible(&brick->event); + brick_wake_smp(&brick->event); return; err: @@ -995,7 +996,7 @@ static int _copy_thread(void *data) } } - wait_event_interruptible_timeout(brick->event, + brick_wait_smp(brick->event, progress > 0 || READ_ONCE(brick->trigger) || brick->copy_start != old_start || @@ -1064,7 +1065,7 @@ static void copy_ref_put(struct copy_output *output, struct mref_object *mref) GENERIC_INPUT_CALL_VOID(input, mref_put, mref); if (atomic_dec_and_test(&brick->io_flight)) { WRITE_ONCE(brick->trigger, true); - wake_up_interruptible(&brick->event); + brick_wake_smp(&brick->event); } }