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/20210608031108.2820996-1-libaokun1@huawei.com Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Baokun Li <libaokun1@huawei.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
1 parent fa73514 commit 3ecda64

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

kernel/trace/ftrace.c

Lines changed: 1 addition & 2 deletions
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)