Commit 205f92d7 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'work.d_name' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull d_name whack-a-mole from Al Viro:
 "A bunch of places that play with ->d_name in printks instead of using
  proper formats..."

* 'work.d_name' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  orangefs_file_mmap(): use %pD
  cifs_debug: use %pd instead of messing with ->d_name
  erofs: use %pd instead of messing with ->d_name
  cramfs: use %pD instead of messing with file_dentry()->d_name
parents 7b7028ed d6756841
...@@ -197,14 +197,14 @@ static int cifs_debug_files_proc_show(struct seq_file *m, void *v) ...@@ -197,14 +197,14 @@ static int cifs_debug_files_proc_show(struct seq_file *m, void *v)
cfile = list_entry(tmp2, struct cifsFileInfo, cfile = list_entry(tmp2, struct cifsFileInfo,
tlist); tlist);
seq_printf(m, seq_printf(m,
"0x%x 0x%llx 0x%x %d %d %d %s", "0x%x 0x%llx 0x%x %d %d %d %pd",
tcon->tid, tcon->tid,
cfile->fid.persistent_fid, cfile->fid.persistent_fid,
cfile->f_flags, cfile->f_flags,
cfile->count, cfile->count,
cfile->pid, cfile->pid,
from_kuid(&init_user_ns, cfile->uid), from_kuid(&init_user_ns, cfile->uid),
cfile->dentry->d_name.name); cfile->dentry);
#ifdef CONFIG_CIFS_DEBUG2 #ifdef CONFIG_CIFS_DEBUG2
seq_printf(m, " 0x%llx\n", cfile->fid.mid); seq_printf(m, " 0x%llx\n", cfile->fid.mid);
#else #else
......
...@@ -392,8 +392,7 @@ static int cramfs_physmem_mmap(struct file *file, struct vm_area_struct *vma) ...@@ -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) ...@@ -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, ...@@ -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;
} }
......
...@@ -234,8 +234,8 @@ static struct dentry *erofs_lookup(struct inode *dir, ...@@ -234,8 +234,8 @@ static struct dentry *erofs_lookup(struct inode *dir,
} else if (err) { } else if (err) {
inode = ERR_PTR(err); inode = ERR_PTR(err);
} else { } else {
erofs_dbg("%s, %s (nid %llu) found, d_type %u", __func__, erofs_dbg("%s, %pd (nid %llu) found, d_type %u", __func__,
dentry->d_name.name, nid, d_type); dentry, nid, d_type);
inode = erofs_iget(dir->i_sb, nid, d_type == FT_DIR); inode = erofs_iget(dir->i_sb, nid, d_type == FT_DIR);
} }
return d_splice_alias(inode, dentry); return d_splice_alias(inode, dentry);
......
...@@ -487,10 +487,7 @@ static int orangefs_file_mmap(struct file *file, struct vm_area_struct *vma) ...@@ -487,10 +487,7 @@ static int orangefs_file_mmap(struct file *file, struct vm_area_struct *vma)
return ret; return ret;
gossip_debug(GOSSIP_FILE_DEBUG, gossip_debug(GOSSIP_FILE_DEBUG,
"orangefs_file_mmap: called on %s\n", "orangefs_file_mmap: called on %pD\n", file);
(file ?
(char *)file->f_path.dentry->d_name.name :
(char *)"Unknown"));
/* set the sequential readahead hint */ /* set the sequential readahead hint */
vma->vm_flags |= VM_SEQ_READ; vma->vm_flags |= VM_SEQ_READ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment