From aa7d5c7e307a0b4f77e8edc682dc60d55a4d5555 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 5 Jan 2021 22:57:20 -0500 Subject: cramfs: use %pD instead of messing with file_dentry()->d_name Signed-off-by: Al Viro --- fs/cramfs/inode.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c index 4b90cfd1ec36..2be65269a987 100644 --- a/fs/cramfs/inode.c +++ b/fs/cramfs/inode.c @@ -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 */ if (pgoff + pages == max_pages && cramfs_last_page_is_shared(inode)) { - pr_debug("mmap: %s: last page is shared\n", - file_dentry(file)->d_name.name); + pr_debug("mmap: %pD: last page is shared\n", file); pages--; } @@ -430,16 +429,15 @@ static int cramfs_physmem_mmap(struct file *file, struct vm_area_struct *vma) } if (!ret) - pr_debug("mapped %s[%lu] at 0x%08lx (%u/%lu pages) " - "to vma 0x%08lx, page_prot 0x%llx\n", - file_dentry(file)->d_name.name, pgoff, - address, pages, vma_pages(vma), vma->vm_start, + pr_debug("mapped %pD[%lu] at 0x%08lx (%u/%lu pages) " + "to vma 0x%08lx, page_prot 0x%llx\n", file, + pgoff, address, pages, vma_pages(vma), vma->vm_start, (unsigned long long)pgprot_val(vma->vm_page_prot)); return ret; bailout: - pr_debug("%s[%lu]: direct mmap impossible: %s\n", - file_dentry(file)->d_name.name, pgoff, bailout_reason); + pr_debug("%pD[%lu]: direct mmap impossible: %s\n", + file, pgoff, bailout_reason); /* Didn't manage any direct map, but normal paging is still possible */ return 0; } @@ -469,8 +467,8 @@ static unsigned long cramfs_physmem_get_unmapped_area(struct file *file, if (!offset || block_pages != pages) return -ENOSYS; addr = sbi->linear_phys_addr + offset; - pr_debug("get_unmapped for %s ofs %#lx siz %lu at 0x%08lx\n", - file_dentry(file)->d_name.name, pgoff*PAGE_SIZE, len, addr); + pr_debug("get_unmapped for %pD ofs %#lx siz %lu at 0x%08lx\n", + file, pgoff*PAGE_SIZE, len, addr); return addr; } -- cgit v1.2.3 From 181b150f1565ac253ec5313fea76ba5d0c4bddf7 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 5 Jan 2021 23:03:16 -0500 Subject: erofs: use %pd instead of messing with ->d_name Signed-off-by: Al Viro --- fs/erofs/namei.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/erofs/namei.c b/fs/erofs/namei.c index 5f8cc7346c69..3a81e1f7fc06 100644 --- a/fs/erofs/namei.c +++ b/fs/erofs/namei.c @@ -234,8 +234,8 @@ static struct dentry *erofs_lookup(struct inode *dir, } else if (err) { inode = ERR_PTR(err); } else { - erofs_dbg("%s, %s (nid %llu) found, d_type %u", __func__, - dentry->d_name.name, nid, d_type); + erofs_dbg("%s, %pd (nid %llu) found, d_type %u", __func__, + dentry, nid, d_type); inode = erofs_iget(dir->i_sb, nid, d_type == FT_DIR); } return d_splice_alias(inode, dentry); -- cgit v1.2.3 From b9e4666fc1c8f0e259c961cafca81046addb7dfe Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 6 Jan 2021 21:53:52 -0500 Subject: cifs_debug: use %pd instead of messing with ->d_name Signed-off-by: Al Viro --- fs/cifs/cifs_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c index b231dcf1d1f9..aa697ccfa9dc 100644 --- a/fs/cifs/cifs_debug.c +++ b/fs/cifs/cifs_debug.c @@ -197,14 +197,14 @@ static int cifs_debug_files_proc_show(struct seq_file *m, void *v) cfile = list_entry(tmp2, struct cifsFileInfo, tlist); 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, cfile->fid.persistent_fid, cfile->f_flags, cfile->count, cfile->pid, from_kuid(&init_user_ns, cfile->uid), - cfile->dentry->d_name.name); + cfile->dentry); #ifdef CONFIG_CIFS_DEBUG2 seq_printf(m, " 0x%llx\n", cfile->fid.mid); #else -- cgit v1.2.3 From d67568410ae1c95004fad85ff1fe78204752f46c Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 6 Jan 2021 21:59:52 -0500 Subject: orangefs_file_mmap(): use %pD ... and no, file can't be NULL there - it's not called that way *and* it would've oopsed a few lines prior on such call anyway. Signed-off-by: Al Viro --- fs/orangefs/file.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c index ec8ae4257975..9b28a7132466 100644 --- a/fs/orangefs/file.c +++ b/fs/orangefs/file.c @@ -487,10 +487,7 @@ static int orangefs_file_mmap(struct file *file, struct vm_area_struct *vma) return ret; gossip_debug(GOSSIP_FILE_DEBUG, - "orangefs_file_mmap: called on %s\n", - (file ? - (char *)file->f_path.dentry->d_name.name : - (char *)"Unknown")); + "orangefs_file_mmap: called on %pD\n", file); /* set the sequential readahead hint */ vma->vm_flags |= VM_SEQ_READ; -- cgit v1.2.3