projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b46a19
)
eventfd: Remove usage of the deprecated ida_simple_xx() API
author
Christophe JAILLET
<christophe.jaillet@wanadoo.fr>
Sun, 10 Dec 2023 17:32:18 +0000
(18:32 +0100)
committer
Christian Brauner
<brauner@kernel.org>
Tue, 12 Dec 2023 13:24:55 +0000
(14:24 +0100)
ida_alloc() and ida_free() should be preferred to the deprecated
ida_simple_get() and ida_simple_remove().
This is less verbose.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link:
https://lore.kernel.org/r/575dcecd51097dd30c5515f9f0ed92076b4ef403.1702229520.git.christophe.jaillet@wanadoo.fr
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/eventfd.c
patch
|
blob
|
history
diff --git
a/fs/eventfd.c
b/fs/eventfd.c
index 16bea05a7c78438d7c57726f86a921fd1c9e2f7a..ad8186d47ba76062f1540835c9a5a0a64f560cd5 100644
(file)
--- a/
fs/eventfd.c
+++ b/
fs/eventfd.c
@@
-82,7
+82,7
@@
EXPORT_SYMBOL_GPL(eventfd_signal_mask);
static void eventfd_free_ctx(struct eventfd_ctx *ctx)
{
if (ctx->id >= 0)
- ida_
simple_remov
e(&eventfd_ida, ctx->id);
+ ida_
fre
e(&eventfd_ida, ctx->id);
kfree(ctx);
}
@@
-395,7
+395,7
@@
static int do_eventfd(unsigned int count, int flags)
init_waitqueue_head(&ctx->wqh);
ctx->count = count;
ctx->flags = flags;
- ctx->id = ida_
simple_get(&eventfd_ida, 0, 0
, GFP_KERNEL);
+ ctx->id = ida_
alloc(&eventfd_ida
, GFP_KERNEL);
flags &= EFD_SHARED_FCNTL_FLAGS;
flags |= O_RDWR;