From: Andy Shevchenko Date: Sat, 3 Nov 2012 00:42:48 +0000 (+1100) Subject: mm: use kbasename() X-Git-Tag: next-20121107~2^2~73 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e1899050ba7e7a9e2d84159ec5c7fd31291a0cff;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 609f42f93c12..bcbc0844ed75 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -60,6 +60,7 @@ #include #include #include +#include #include #include @@ -4062,15 +4063,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);