Commit 1c7f9b67 authored by Steven Rostedt (VMware)'s avatar Steven Rostedt (VMware)
Browse files

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
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -5093,7 +5093,6 @@ int register_ftrace_direct(unsigned long ip, unsigned long addr)
			ftrace_direct_func_count--;
		}
	} else {
		if (!direct->count)
		direct->count++;
	}
 out_unlock: