diff options
author | Christian Brauner <brauner@kernel.org> | 2023-11-22 13:48:24 +0100 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-11-28 14:08:46 +0100 |
commit | 120ae58593630819209a011a3f9c89f73bcc9894 (patch) | |
tree | 34688daa5e226f01303534e6b6c9d8610e745bf4 /fs/eventfd.c | |
parent | eventfd: simplify eventfd_signal() (diff) | |
download | linux-120ae58593630819209a011a3f9c89f73bcc9894.tar.xz linux-120ae58593630819209a011a3f9c89f73bcc9894.zip |
eventfd: simplify eventfd_signal_mask()
The eventfd_signal_mask() helper was introduced for io_uring and similar
to eventfd_signal() it always passed 1 for @n. So don't bother with that
argument at all.
Link: https://lore.kernel.org/r/20231122-vfs-eventfd-signal-v2-3-bd549b14ce0c@kernel.org
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/eventfd.c')
-rw-r--r-- | fs/eventfd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/eventfd.c b/fs/eventfd.c index d2f7d2d8a351..41109ba6bbe0 100644 --- a/fs/eventfd.c +++ b/fs/eventfd.c @@ -43,9 +43,10 @@ struct eventfd_ctx { int id; }; -__u64 eventfd_signal_mask(struct eventfd_ctx *ctx, __u64 n, __poll_t mask) +__u64 eventfd_signal_mask(struct eventfd_ctx *ctx, __poll_t mask) { unsigned long flags; + __u64 n = 1; /* * Deadlock or stack overflow issues can happen if we recurse here @@ -68,7 +69,7 @@ __u64 eventfd_signal_mask(struct eventfd_ctx *ctx, __u64 n, __poll_t mask) current->in_eventfd = 0; spin_unlock_irqrestore(&ctx->wqh.lock, flags); - return n; + return n == 1; } /** @@ -84,7 +85,7 @@ __u64 eventfd_signal_mask(struct eventfd_ctx *ctx, __u64 n, __poll_t mask) */ __u64 eventfd_signal(struct eventfd_ctx *ctx) { - return eventfd_signal_mask(ctx, 1, 0); + return eventfd_signal_mask(ctx, 0); } EXPORT_SYMBOL_GPL(eventfd_signal); |