From: Andy Shevchenko Date: Tue, 18 Dec 2012 00:01:23 +0000 (-0800) Subject: mm: use kbasename() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2fbc57c53a815ea30b926dd7627897a02daae302;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git mm: use kbasename() Signed-off-by: Andy Shevchenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memory.c b/mm/memory.c index 23f1fdfdfcf..e0a9b0ce4f1 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -58,6 +58,7 @@ #include #include #include +#include #include #include @@ -4118,15 +4119,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);