-From 69635a5b9099e2bf0766c6c4ff33c2be992e2d9b Mon Sep 17 00:00:00 2001
+From 1db0acd797baad3e413cca4d14c88e86f92c6d56 Mon Sep 17 00:00:00 2001
From: Sasha Levin <sashal@kernel.org>
Date: Sun, 8 Sep 2019 20:15:18 -0700
Subject: fuse: fix deadlock with aio poll and fuse_iqueue::waitq.lock
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
- fs/fuse/dev.c | 89 +++++++++++++++++++++++++-----------------------
+ fs/fuse/dev.c | 91 +++++++++++++++++++++++++-----------------------
fs/fuse/fuse_i.h | 3 ++
fs/fuse/inode.c | 1 +
- 3 files changed, 50 insertions(+), 43 deletions(-)
+ 3 files changed, 51 insertions(+), 44 deletions(-)
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
-index 6ee471b72a34d..c0d59a86ada2e 100644
+index 6ee471b72a34d..6d39143cfa094 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -331,7 +331,7 @@ static void queue_request(struct fuse_iqueue *fiq, struct fuse_req *req)
}
if (list_empty(&req->intr_entry)) {
list_add_tail(&req->intr_entry, &fiq->interrupts);
- wake_up_locked(&fiq->waitq);
+- wake_up_locked(&fiq->waitq);
++ wake_up(&fiq->waitq);
}
- spin_unlock(&fiq->waitq.lock);
+ spin_unlock(&fiq->lock);