summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-08-31 15:57:25 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-17 13:04:47 +0300
commit92b69466102b456c58ae9725540013f893850b6d (patch)
tree146a52cadaa833613fcb651e0442e4b0337f467d
parent31132a895eaaa28439664ea4d70e6cc1b36f130e (diff)
downloadlinux-92b69466102b456c58ae9725540013f893850b6d.tar.xz
io-wq: ensure that hash wait lock is IRQ disabling
commit 08bdbd39b58474d762242e1fadb7f2eb9ffcca71 upstream. A previous commit removed the IRQ safety of the worker and wqe locks, but that left one spot of the hash wait lock now being done without already having IRQs disabled. Ensure that we use the right locking variant for the hashed waitqueue lock. Fixes: a9a4aa9fbfc5 ("io-wq: wqe and worker locks no longer need to be IRQ safe") Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/io-wq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/io-wq.c b/fs/io-wq.c
index cb5d84f6b769..4f460797f962 100644
--- a/fs/io-wq.c
+++ b/fs/io-wq.c
@@ -405,7 +405,7 @@ static void io_wait_on_hash(struct io_wqe *wqe, unsigned int hash)
{
struct io_wq *wq = wqe->wq;
- spin_lock(&wq->hash->wait.lock);
+ spin_lock_irq(&wq->hash->wait.lock);
if (list_empty(&wqe->wait.entry)) {
__add_wait_queue(&wq->hash->wait, &wqe->wait);
if (!test_bit(hash, &wq->hash->map)) {
@@ -413,7 +413,7 @@ static void io_wait_on_hash(struct io_wqe *wqe, unsigned int hash)
list_del_init(&wqe->wait.entry);
}
}
- spin_unlock(&wq->hash->wait.lock);
+ spin_unlock_irq(&wq->hash->wait.lock);
}
/*