From 44a23ff1f089e87d28c7035a1c58126c6de9da81 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 2 Mar 2021 21:00:33 -0700 Subject: [PATCH] io_uring: debug messages Signed-off-by: Jens Axboe --- fs/io_uring.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/fs/io_uring.c b/fs/io_uring.c index dc30034f453f..6e78f03f9346 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -4920,8 +4920,14 @@ static int io_poll_double_wake(struct wait_queue_entry *wait, unsigned mode, list_del_init(&wait->entry); if (poll && poll->head) { + struct io_poll_iocb *dpoll = io_poll_get_double(req); bool done; + if (dpoll->head == poll->head) + printk(KERN_ERR "poll and dpoll head identical\n"); + else + printk(KERN_ERR "poll and dpoll head different\n"); + spin_lock(&poll->head->lock); done = list_empty(&poll->wait.entry); if (!done) @@ -4969,8 +4975,12 @@ static void __io_queue_proc(struct io_poll_iocb *poll, struct io_poll_table *pt, return; } /* double add on the same waitqueue head, ignore */ - if (poll->head == head) + if (poll->head == head) { + printk(KERN_ERR "Ignore double poll same head\n"); return; + } else { + printk(KERN_ERR "Double poll %lx %lx\n", (long) poll->head, (long) head); + } poll = kmalloc(sizeof(*poll), GFP_ATOMIC); if (!poll) { pt->error = -ENOMEM; -- 2.25.1