From: Andy Shevchenko Date: Thu, 25 Oct 2012 01:15:05 +0000 (+1100) Subject: mm: use kbasename() X-Git-Tag: next-20121029~1^2~59 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=86bdc2d3f3983ca84fb2ed4ada92bcb28beeaa3e;p=karo-tx-linux.git mm: use kbasename() Signed-off-by: Andy Shevchenko Signed-off-by: Andrew Morton --- diff --git a/mm/memory.c b/mm/memory.c index da0360314e09..f21ac1c33aed 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -60,6 +60,7 @@ #include #include #include +#include #include #include @@ -4057,15 +4058,12 @@ void print_vma_addr(char *prefix, unsigned long ip) struct file *f = vma->vm_file; char *buf = (char *)__get_free_page(GFP_KERNEL); if (buf) { - char *p, *s; + char *p; p = d_path(&f->f_path, buf, PAGE_SIZE); if (IS_ERR(p)) p = "?"; - s = strrchr(p, '/'); - if (s) - p = s+1; - printk("%s%s[%lx+%lx]", prefix, p, + printk("%s%s[%lx+%lx]", prefix, kbasename(p), vma->vm_start, vma->vm_end - vma->vm_start); free_page((unsigned long)buf);