libtracefs: Fix tracefs_mmap() kbuf usage

The tracefs_mmap() function used the "kbuf" variable instead of the
"tmap->kbuf" variable which caused confusion later on.

The kbuf passed in is only used to make the "duplicate" for tmap->kbuf, so
once that is done, just assign kbuf = tmap->kbuf and use "kbuf" throughout
the rest of the function to avoid confusion.

Link: https://lore.kernel.org/linux-trace-devel/20240110030116.81837-5-rostedt@goodmis.org

Cc: Vincent Donnefort <vdonnefort@google.com>
Fixes: 2ed14b594f669 ("libtracefs: Add ring buffer memory mapping APIs")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 file changed