ftrace: Fix accounting bug with direct->count in register_ftrace_direct()

The direct->count wasn't being updated properly, where it only was updated
when the first entry was added, but should be updated every time.

Fixes: 013bf0da ("ftrace: Add ftrace_find_direct_func()")
Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
parent 760f8bc7
......@@ -5093,8 +5093,7 @@ int register_ftrace_direct(unsigned long ip, unsigned long addr)
ftrace_direct_func_count--;
}
} else {
if (!direct->count)
direct->count++;
direct->count++;
}
out_unlock:
mutex_unlock(&direct_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment