libtracefs: Move opening of file out of controlled_write()

In order to try multiple methods of writing to the filter file, the opening
of the filter file needs to be in the tracefs_function_filter() call, and
allow that to be passed to multiple ways of writing to the filter.

Link: https://lore.kernel.org/linux-trace-devel/20210330005247.820340155@goodmis.org

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
1 file changed