diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2013-08-12 14:39:22 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-12 15:14:46 -0700 |
commit | e495dd833b2345f89888378c6ec7456995791087 (patch) | |
tree | a646a9aa84e3e3884c5cbe3e0ab0ace50fa2c1fd /drivers/staging/lustre | |
parent | 3457bfd6dfb38f7bb66a227fe3473bad4773de06 (diff) | |
download | linux-e495dd833b2345f89888378c6ec7456995791087.tar.bz2 |
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre')
-rw-r--r-- | drivers/staging/lustre/lustre/libcfs/tracefile.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/lustre/lustre/libcfs/tracefile.c b/drivers/staging/lustre/lustre/libcfs/tracefile.c index 68c77d381395..357f40079ae0 100644 --- a/drivers/staging/lustre/lustre/libcfs/tracefile.c +++ b/drivers/staging/lustre/lustre/libcfs/tracefile.c @@ -275,12 +275,9 @@ int libcfs_debug_vmsg2(struct libcfs_debug_msg_data *msgdata, int i; int remain; 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; - if (strchr(file, '/')) - file = strrchr(file, '/') + 1; - tcd = cfs_trace_get_tcd(); /* cfs_trace_get_tcd() grabs a lock, which disables preemption and |