[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230905214235.320571-5-peterx@redhat.com>
Date: Tue, 5 Sep 2023 17:42:32 -0400
From: Peter Xu <peterx@...hat.com>
To: linux-kernel@...r.kernel.org, linux-mm@...ck.org
Cc: Anish Moorthy <amoorthy@...gle.com>,
Axel Rasmussen <axelrasmussen@...gle.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
Mike Kravetz <mike.kravetz@...cle.com>,
Peter Zijlstra <peterz@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Mike Rapoport <rppt@...nel.org>,
Christian Brauner <brauner@...nel.org>, peterx@...hat.com,
linux-fsdevel@...r.kernel.org,
Andrea Arcangeli <aarcange@...hat.com>,
Ingo Molnar <mingo@...hat.com>,
James Houghton <jthoughton@...gle.com>,
Nadav Amit <nadav.amit@...il.com>
Subject: [PATCH 4/7] fs/userfaultfd: Use exclusive waitqueue for poll()
Userfaultfd is the kind of fd that does not need a wake all semantics when
wake up. Enqueue using the new POLL_ENQUEUE_EXCLUSIVE flag.
Signed-off-by: Peter Xu <peterx@...hat.com>
---
fs/userfaultfd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c
index f7fda7d0c994..9c39adc398fc 100644
--- a/fs/userfaultfd.c
+++ b/fs/userfaultfd.c
@@ -994,7 +994,7 @@ static __poll_t userfaultfd_poll(struct file *file, poll_table *wait)
struct userfaultfd_ctx *ctx = file->private_data;
__poll_t ret;
- poll_wait(file, &ctx->fd_wqh, wait);
+ poll_wait_exclusive(file, &ctx->fd_wqh, wait);
if (!userfaultfd_is_initialized(ctx))
return EPOLLERR;
--
2.41.0
Powered by blists - more mailing lists