Commit e495dd83 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

staging: lustre: re-use kbasename() common helper

To get the name of a file from a pathname we may use kbasename() helper.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3457bfd6
...@@ -275,12 +275,9 @@ int libcfs_debug_vmsg2(struct libcfs_debug_msg_data *msgdata, ...@@ -275,12 +275,9 @@ int libcfs_debug_vmsg2(struct libcfs_debug_msg_data *msgdata,
int i; int i;
int remain; int remain;
int mask = msgdata->msg_mask; int mask = msgdata->msg_mask;
char *file = (char *)msgdata->msg_file; const char *file = kbasename(msgdata->msg_file);
cfs_debug_limit_state_t *cdls = msgdata->msg_cdls; cfs_debug_limit_state_t *cdls = msgdata->msg_cdls;
if (strchr(file, '/'))
file = strrchr(file, '/') + 1;
tcd = cfs_trace_get_tcd(); tcd = cfs_trace_get_tcd();
/* cfs_trace_get_tcd() grabs a lock, which disables preemption and /* cfs_trace_get_tcd() grabs a lock, which disables preemption and
......
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