Skip to content

Commit 3ecda64

Browse files
LiBaokun96rostedt
authored andcommitted
ftrace: Use list_move instead of list_del/list_add
Using list_move() instead of list_del() + list_add(). Link: https://lkml.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Baokun Li <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent fa73514 commit 3ecda64

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

kernel/trace/ftrace.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -4212,8 +4212,7 @@ static void process_mod_list(struct list_head *head, struct ftrace_ops *ops,
42124212
if (!func) /* warn? */
42134213
continue;
42144214

4215-
list_del(&ftrace_mod->list);
4216-
list_add(&ftrace_mod->list, &process_mods);
4215+
list_move(&ftrace_mod->list, &process_mods);
42174216

42184217
/* Use the newly allocated func, as it may be "*" */
42194218
kfree(ftrace_mod->func);

0 commit comments

Comments
 (0)