forked from Minki/linux
cramfs: use %pD instead of messing with file_dentry()->d_name
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
5c8fe583cc
commit
aa7d5c7e30
@ -392,8 +392,7 @@ static int cramfs_physmem_mmap(struct file *file, struct vm_area_struct *vma)
|
|||||||
|
|
||||||
/* Don't map the last page if it contains some other data */
|
/* Don't map the last page if it contains some other data */
|
||||||
if (pgoff + pages == max_pages && cramfs_last_page_is_shared(inode)) {
|
if (pgoff + pages == max_pages && cramfs_last_page_is_shared(inode)) {
|
||||||
pr_debug("mmap: %s: last page is shared\n",
|
pr_debug("mmap: %pD: last page is shared\n", file);
|
||||||
file_dentry(file)->d_name.name);
|
|
||||||
pages--;
|
pages--;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -430,16 +429,15 @@ static int cramfs_physmem_mmap(struct file *file, struct vm_area_struct *vma)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
pr_debug("mapped %s[%lu] at 0x%08lx (%u/%lu pages) "
|
pr_debug("mapped %pD[%lu] at 0x%08lx (%u/%lu pages) "
|
||||||
"to vma 0x%08lx, page_prot 0x%llx\n",
|
"to vma 0x%08lx, page_prot 0x%llx\n", file,
|
||||||
file_dentry(file)->d_name.name, pgoff,
|
pgoff, address, pages, vma_pages(vma), vma->vm_start,
|
||||||
address, pages, vma_pages(vma), vma->vm_start,
|
|
||||||
(unsigned long long)pgprot_val(vma->vm_page_prot));
|
(unsigned long long)pgprot_val(vma->vm_page_prot));
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
bailout:
|
bailout:
|
||||||
pr_debug("%s[%lu]: direct mmap impossible: %s\n",
|
pr_debug("%pD[%lu]: direct mmap impossible: %s\n",
|
||||||
file_dentry(file)->d_name.name, pgoff, bailout_reason);
|
file, pgoff, bailout_reason);
|
||||||
/* Didn't manage any direct map, but normal paging is still possible */
|
/* Didn't manage any direct map, but normal paging is still possible */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -469,8 +467,8 @@ static unsigned long cramfs_physmem_get_unmapped_area(struct file *file,
|
|||||||
if (!offset || block_pages != pages)
|
if (!offset || block_pages != pages)
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
addr = sbi->linear_phys_addr + offset;
|
addr = sbi->linear_phys_addr + offset;
|
||||||
pr_debug("get_unmapped for %s ofs %#lx siz %lu at 0x%08lx\n",
|
pr_debug("get_unmapped for %pD ofs %#lx siz %lu at 0x%08lx\n",
|
||||||
file_dentry(file)->d_name.name, pgoff*PAGE_SIZE, len, addr);
|
file, pgoff*PAGE_SIZE, len, addr);
|
||||||
return addr;
|
return addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user