diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2012-12-17 19:01:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-17 20:15:17 -0500 |
commit | 2fbc57c53a815ea30b926dd7627897a02daae302 (patch) | |
tree | 0e2ed68c2b93e6d0d28a1f7c7a328e014a523fb5 /mm | |
parent | 35367ab28d024ef026dbd797b4076c8f008ec08c (diff) |
mm: use kbasename()
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/mm/memory.c b/mm/memory.c index 23f1fdfdfcf1..e0a9b0ce4f10 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -58,6 +58,7 @@ | |||
58 | #include <linux/elf.h> | 58 | #include <linux/elf.h> |
59 | #include <linux/gfp.h> | 59 | #include <linux/gfp.h> |
60 | #include <linux/migrate.h> | 60 | #include <linux/migrate.h> |
61 | #include <linux/string.h> | ||
61 | 62 | ||
62 | #include <asm/io.h> | 63 | #include <asm/io.h> |
63 | #include <asm/pgalloc.h> | 64 | #include <asm/pgalloc.h> |
@@ -4118,15 +4119,12 @@ void print_vma_addr(char *prefix, unsigned long ip) | |||
4118 | struct file *f = vma->vm_file; | 4119 | struct file *f = vma->vm_file; |
4119 | char *buf = (char *)__get_free_page(GFP_KERNEL); | 4120 | char *buf = (char *)__get_free_page(GFP_KERNEL); |
4120 | if (buf) { | 4121 | if (buf) { |
4121 | char *p, *s; | 4122 | char *p; |
4122 | 4123 | ||
4123 | p = d_path(&f->f_path, buf, PAGE_SIZE); | 4124 | p = d_path(&f->f_path, buf, PAGE_SIZE); |
4124 | if (IS_ERR(p)) | 4125 | if (IS_ERR(p)) |
4125 | p = "?"; | 4126 | p = "?"; |
4126 | s = strrchr(p, '/'); | 4127 | printk("%s%s[%lx+%lx]", prefix, kbasename(p), |
4127 | if (s) | ||
4128 | p = s+1; | ||
4129 | printk("%s%s[%lx+%lx]", prefix, p, | ||
4130 | vma->vm_start, | 4128 | vma->vm_start, |
4131 | vma->vm_end - vma->vm_start); | 4129 | vma->vm_end - vma->vm_start); |
4132 | free_page((unsigned long)buf); | 4130 | free_page((unsigned long)buf); |