diff options
| author | Mark Brown <[email protected]> | 2023-07-23 22:33:05 +0000 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2023-07-23 22:33:05 +0000 |
| commit | de1b43a57aff8b1808bbfe0402932f9e373d1172 (patch) | |
| tree | 699c828946223aab18a0aab5175e6902a8ce2e42 /lib/sbitmap.c | |
| parent | ASoC: wm8960: Add DAC filter characteristics selection (diff) | |
| parent | Linux 6.5-rc3 (diff) | |
| download | kernel-de1b43a57aff8b1808bbfe0402932f9e373d1172.tar.gz kernel-de1b43a57aff8b1808bbfe0402932f9e373d1172.zip | |
ASoC: Merge up fixes from mainline
There's several things here that will really help my CI.
Diffstat (limited to 'lib/sbitmap.c')
| -rw-r--r-- | lib/sbitmap.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/sbitmap.c b/lib/sbitmap.c index eff4e42c425a..d0a5081dfd12 100644 --- a/lib/sbitmap.c +++ b/lib/sbitmap.c @@ -550,7 +550,7 @@ EXPORT_SYMBOL_GPL(sbitmap_queue_min_shallow_depth); static void __sbitmap_queue_wake_up(struct sbitmap_queue *sbq, int nr) { - int i, wake_index; + int i, wake_index, woken; if (!atomic_read(&sbq->ws_active)) return; @@ -567,13 +567,12 @@ static void __sbitmap_queue_wake_up(struct sbitmap_queue *sbq, int nr) */ wake_index = sbq_index_inc(wake_index); - /* - * It is sufficient to wake up at least one waiter to - * guarantee forward progress. - */ - if (waitqueue_active(&ws->wait) && - wake_up_nr(&ws->wait, nr)) - break; + if (waitqueue_active(&ws->wait)) { + woken = wake_up_nr(&ws->wait, nr); + if (woken == nr) + break; + nr -= woken; + } } if (wake_index != atomic_read(&sbq->wake_index)) |
