[rh7,1/4] ploop: Simplify check in ploop_fast_end_io()

Submitted by Kirill Tkhai on March 5, 2020, 12:46 p.m.

Details

Message ID 158341239070.293365.16977163715389999334.stgit@localhost.localdomain
State New
Series "ploop: Be over protectable on discard"
Headers show

Commit Message

Kirill Tkhai March 5, 2020, 12:46 p.m.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 drivers/block/ploop/dev.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index 25150fb0467b..67cc9e46c4cb 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -672,8 +672,8 @@  DEFINE_BIO_CB(ploop_fast_end_io)
 	    (test_bit(PLOOP_S_EXITING, &plo->state) ||
 	     !list_empty(&plo->entry_queue)))
 		wake_up_interruptible(&plo->waitq);
-	if ((plo->fast_path_disabled_count || plo->bio_discard_inflight_reqs) &&
-	    !plo->fastpath_reqs)
+	if (!plo->fastpath_reqs &&
+	    waitqueue_active(&plo->fast_path_waitq))
 		wake_up(&plo->fast_path_waitq);
 	spin_unlock_irqrestore(&plo->lock, flags);