assorted conversions to %p[dD]
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 22 Oct 2014 00:11:25 +0000 (20:11 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 19 Nov 2014 18:01:20 +0000 (13:01 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
36 files changed:
arch/powerpc/oprofile/cell/spu_task_sync.c
arch/s390/hypfs/hypfs_dbfs.c
arch/x86/ia32/ia32_aout.c
drivers/gpu/drm/armada/armada_gem.c
drivers/media/pci/zoran/zoran_procfs.c
drivers/misc/genwqe/card_dev.c
drivers/s390/char/hmcdrv_dev.c
drivers/scsi/lpfc/lpfc_debugfs.c
fs/9p/vfs_inode_dotl.c
fs/affs/inode.c
fs/affs/namei.c
fs/afs/dir.c
fs/afs/inode.c
fs/afs/mntpt.c
fs/afs/write.c
fs/autofs4/expire.c
fs/autofs4/root.c
fs/befs/linuxvfs.c
fs/binfmt_aout.c
fs/cachefiles/namei.c
fs/cachefiles/xattr.c
fs/ceph/debugfs.c
fs/ceph/dir.c
fs/ceph/file.c
fs/ceph/inode.c
fs/configfs/dir.c
fs/fuse/file.c
fs/jfs/namei.c
fs/nfs/dir.c
fs/nfsd/nfs4xdr.c
fs/ntfs/namei.c
fs/ocfs2/dcache.c
fs/ocfs2/dlmfs/dlmfs.c
fs/ocfs2/dlmglue.c
fs/reiserfs/xattr.c
security/smack/smack_lsm.c

index 28f1af2db1f564525dc374f3b7cf9eee0b5a1175..1c27831df1ac4b70cc24c680b2e7f432bf20e945 100644 (file)
@@ -331,8 +331,7 @@ get_exec_dcookie_and_offset(struct spu *spu, unsigned int *offsetp,
 
        if (mm->exe_file) {
                app_cookie = fast_get_dcookie(&mm->exe_file->f_path);
-               pr_debug("got dcookie for %s\n",
-                        mm->exe_file->f_dentry->d_name.name);
+               pr_debug("got dcookie for %pD\n", mm->exe_file);
        }
 
        for (vma = mm->mmap; vma; vma = vma->vm_next) {
@@ -342,15 +341,14 @@ get_exec_dcookie_and_offset(struct spu *spu, unsigned int *offsetp,
                if (!vma->vm_file)
                        goto fail_no_image_cookie;
 
-               pr_debug("Found spu ELF at %X(object-id:%lx) for file %s\n",
-                        my_offset, spu_ref,
-                        vma->vm_file->f_dentry->d_name.name);
+               pr_debug("Found spu ELF at %X(object-id:%lx) for file %pD\n",
+                        my_offset, spu_ref, vma->vm_file);
                *offsetp = my_offset;
                break;
        }
 
        *spu_bin_dcookie = fast_get_dcookie(&vma->vm_file->f_path);
-       pr_debug("got dcookie for %s\n", vma->vm_file->f_dentry->d_name.name);
+       pr_debug("got dcookie for %pD\n", vma->vm_file);
 
        up_read(&mm->mmap_sem);
 
index 2badf2bf9cd74217806129bb5a578ac1fd8e1131..47fe1055c714a34c1348b3a734705a408aff081b 100644 (file)
@@ -83,10 +83,9 @@ static ssize_t dbfs_read(struct file *file, char __user *buf,
 
 static long dbfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
-       struct hypfs_dbfs_file *df;
+       struct hypfs_dbfs_file *df = file_inode(file)->i_private;
        long rc;
 
-       df = file->f_path.dentry->d_inode->i_private;
        mutex_lock(&df->lock);
        if (df->unlocked_ioctl)
                rc = df->unlocked_ioctl(file, cmd, arg);
index df91466f973de7d568fe93b3ba64fb625ffc8e05..ae6aad1d24f79e37a16a022cdb4cf72597f67b71 100644 (file)
@@ -342,8 +342,8 @@ static int load_aout_binary(struct linux_binprm *bprm)
                            time_after(jiffies, error_time + 5*HZ)) {
                        printk(KERN_WARNING
                               "fd_offset is not page aligned. Please convert "
-                              "program: %s\n",
-                              bprm->file->f_path.dentry->d_name.name);
+                              "program: %pD\n",
+                              bprm->file);
                        error_time = jiffies;
                }
 #endif
@@ -429,8 +429,8 @@ static int load_aout_library(struct file *file)
                if (time_after(jiffies, error_time + 5*HZ)) {
                        printk(KERN_WARNING
                               "N_TXTOFF is not page aligned. Please convert "
-                              "library: %s\n",
-                              file->f_path.dentry->d_name.name);
+                              "library: %pD\n",
+                              file);
                        error_time = jiffies;
                }
 #endif
index 7496f55611a56c147ddd9bb1f3c4b674f511bba7..ef5feeecec8489d9c816b3d74e5c7f539850afc9 100644 (file)
@@ -226,7 +226,7 @@ struct armada_gem_object *armada_gem_alloc_object(struct drm_device *dev,
 
        obj->dev_addr = DMA_ERROR_CODE;
 
-       mapping = obj->obj.filp->f_path.dentry->d_inode->i_mapping;
+       mapping = file_inode(obj->obj.filp)->i_mapping;
        mapping_set_gfp_mask(mapping, GFP_HIGHUSER | __GFP_RECLAIMABLE);
 
        DRM_DEBUG_DRIVER("alloc obj %p size %zu\n", obj, size);
index f7ceee0cdefdee4d5ef1b64429bc02d309a8c5e8..437652761093746e8536ef5ca04e9ca1a9e3df79 100644 (file)
@@ -157,8 +157,8 @@ static ssize_t zoran_write(struct file *file, const char __user *buffer,
                return -EFAULT;
        }
        string[count] = 0;
-       dprintk(4, KERN_INFO "%s: write_proc: name=%s count=%zu zr=%p\n",
-               ZR_DEVNAME(zr), file->f_path.dentry->d_name.name, count, zr);
+       dprintk(4, KERN_INFO "%s: write_proc: name=%pD count=%zu zr=%p\n",
+               ZR_DEVNAME(zr), file, count, zr);
        ldelim = " \t\n";
        tdelim = "=";
        line = strpbrk(sp, ldelim);
index 5918586f2f76095c81e6b4b509a1428dd0ad7fb4..c49d244265eccd6c4017a8bcd73a7f0749fdc3dc 100644 (file)
@@ -395,7 +395,7 @@ static void genwqe_vma_open(struct vm_area_struct *vma)
 static void genwqe_vma_close(struct vm_area_struct *vma)
 {
        unsigned long vsize = vma->vm_end - vma->vm_start;
-       struct inode *inode = vma->vm_file->f_dentry->d_inode;
+       struct inode *inode = file_inode(vma->vm_file);
        struct dma_mapping *dma_map;
        struct genwqe_dev *cd = container_of(inode->i_cdev, struct genwqe_dev,
                                            cdev_genwqe);
index 0c5176179c17d20fa659009c86f3b8d3b509692b..43cee7fcd01ce7223632797ec690ee8a9ed8ef12 100644 (file)
@@ -136,8 +136,7 @@ static int hmcdrv_dev_open(struct inode *inode, struct file *fp)
        if (rc)
                module_put(THIS_MODULE);
 
-       pr_debug("open file '/dev/%s' with return code %d\n",
-                fp->f_dentry->d_name.name, rc);
+       pr_debug("open file '/dev/%pD' with return code %d\n", fp, rc);
        return rc;
 }
 
@@ -146,7 +145,7 @@ static int hmcdrv_dev_open(struct inode *inode, struct file *fp)
  */
 static int hmcdrv_dev_release(struct inode *inode, struct file *fp)
 {
-       pr_debug("closing file '/dev/%s'\n", fp->f_dentry->d_name.name);
+       pr_debug("closing file '/dev/%pD'\n", fp);
        kfree(fp->private_data);
        fp->private_data = NULL;
        hmcdrv_ftp_shutdown();
@@ -231,8 +230,8 @@ static ssize_t hmcdrv_dev_read(struct file *fp, char __user *ubuf,
        retlen = hmcdrv_dev_transfer((char *) fp->private_data,
                                     *pos, ubuf, len);
 
-       pr_debug("read from file '/dev/%s' at %lld returns %zd/%zu\n",
-                fp->f_dentry->d_name.name, (long long) *pos, retlen, len);
+       pr_debug("read from file '/dev/%pD' at %lld returns %zd/%zu\n",
+                fp, (long long) *pos, retlen, len);
 
        if (retlen > 0)
                *pos += retlen;
@@ -248,8 +247,8 @@ static ssize_t hmcdrv_dev_write(struct file *fp, const char __user *ubuf,
 {
        ssize_t retlen;
 
-       pr_debug("writing file '/dev/%s' at pos. %lld with length %zd\n",
-                fp->f_dentry->d_name.name, (long long) *pos, len);
+       pr_debug("writing file '/dev/%pD' at pos. %lld with length %zd\n",
+                fp, (long long) *pos, len);
 
        if (!fp->private_data) { /* first expect a cmd write */
                fp->private_data = kmalloc(len + 1, GFP_KERNEL);
@@ -272,8 +271,7 @@ static ssize_t hmcdrv_dev_write(struct file *fp, const char __user *ubuf,
        if (retlen > 0)
                *pos += retlen;
 
-       pr_debug("write to file '/dev/%s' returned %zd\n",
-                fp->f_dentry->d_name.name, retlen);
+       pr_debug("write to file '/dev/%pD' returned %zd\n", fp, retlen);
 
        return retlen;
 }
index 786a2aff7b594fe7cb3978125cb2d2a2e3959389..1311ab15243e6e9bf8ac1853a73f1d4fe9f73d8e 100644 (file)
@@ -968,8 +968,8 @@ lpfc_debugfs_dumpDif_open(struct inode *inode, struct file *file)
                goto out;
 
        /* Round to page boundary */
-       printk(KERN_ERR "9060 BLKGRD: %s: _dump_buf_dif=0x%p file=%s\n",
-               __func__, _dump_buf_dif, file->f_dentry->d_name.name);
+       printk(KERN_ERR "9060 BLKGRD: %s: _dump_buf_dif=0x%p file=%pD\n",
+               __func__, _dump_buf_dif, file);
        debug->buffer = _dump_buf_dif;
        if (!debug->buffer) {
                kfree(debug);
index 02b64f4e576ac48aa2f3310be3634e65c28a6079..6054c16b8faed41d0e80771a5a711f7c06a79fe8 100644 (file)
@@ -826,8 +826,8 @@ v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, umode_t omode,
        struct dentry *dir_dentry;
        struct posix_acl *dacl = NULL, *pacl = NULL;
 
-       p9_debug(P9_DEBUG_VFS, " %lu,%s mode: %hx MAJOR: %u MINOR: %u\n",
-                dir->i_ino, dentry->d_name.name, omode,
+       p9_debug(P9_DEBUG_VFS, " %lu,%pd mode: %hx MAJOR: %u MINOR: %u\n",
+                dir->i_ino, dentry, omode,
                 MAJOR(rdev), MINOR(rdev));
 
        if (!new_valid_dev(rdev))
index e217c511459bbfdd0fe36e745cf2a0c7fe6d2bd2..d0609a282e1dadb8f34198e600af6d1c47cebb2e 100644 (file)
@@ -348,9 +348,9 @@ affs_add_entry(struct inode *dir, struct inode *inode, struct dentry *dentry, s3
        u32 block = 0;
        int retval;
 
-       pr_debug("%s(dir=%u, inode=%u, \"%*s\", type=%d)\n",
+       pr_debug("%s(dir=%u, inode=%u, \"%pd\", type=%d)\n",
                 __func__, (u32)dir->i_ino,
-                (u32)inode->i_ino, (int)dentry->d_name.len, dentry->d_name.name, type);
+                (u32)inode->i_ino, dentry, type);
 
        retval = -EIO;
        bh = affs_bread(sb, inode->i_ino);
index 035bd31556fc5a6f42f9eef1152ceb5d53eb3f6b..bbc38530e924eb61fe69297dd761b41ddb14db82 100644 (file)
@@ -190,8 +190,7 @@ affs_find_entry(struct inode *dir, struct dentry *dentry)
        toupper_t toupper = affs_get_toupper(sb);
        u32 key;
 
-       pr_debug("%s(\"%.*s\")\n",
-                __func__, (int)dentry->d_name.len, dentry->d_name.name);
+       pr_debug("%s(\"%pd\")\n", __func__, dentry);
 
        bh = affs_bread(sb, dir->i_ino);
        if (!bh)
@@ -219,8 +218,7 @@ affs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
        struct buffer_head *bh;
        struct inode *inode = NULL;
 
-       pr_debug("%s(\"%.*s\")\n",
-                __func__, (int)dentry->d_name.len, dentry->d_name.name);
+       pr_debug("%s(\"%pd\")\n", __func__, dentry);
 
        affs_lock_dir(dir);
        bh = affs_find_entry(dir, dentry);
@@ -250,9 +248,9 @@ affs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
 int
 affs_unlink(struct inode *dir, struct dentry *dentry)
 {
-       pr_debug("%s(dir=%d, %lu \"%.*s\")\n",
+       pr_debug("%s(dir=%d, %lu \"%pd\")\n",
                 __func__, (u32)dir->i_ino, dentry->d_inode->i_ino,
-               (int)dentry->d_name.len, dentry->d_name.name);
+               dentry);
 
        return affs_remove_header(dentry);
 }
@@ -264,9 +262,8 @@ affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl)
        struct inode    *inode;
        int              error;
 
-       pr_debug("%s(%lu,\"%.*s\",0%ho)\n",
-                __func__, dir->i_ino, (int)dentry->d_name.len,
-                dentry->d_name.name,mode);
+       pr_debug("%s(%lu,\"%pd\",0%ho)\n",
+                __func__, dir->i_ino, dentry, mode);
 
        inode = affs_new_inode(dir);
        if (!inode)
@@ -294,9 +291,8 @@ affs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
        struct inode            *inode;
        int                      error;
 
-       pr_debug("%s(%lu,\"%.*s\",0%ho)\n",
-                __func__, dir->i_ino, (int)dentry->d_name.len,
-                dentry->d_name.name, mode);
+       pr_debug("%s(%lu,\"%pd\",0%ho)\n",
+                __func__, dir->i_ino, dentry, mode);
 
        inode = affs_new_inode(dir);
        if (!inode)
@@ -321,9 +317,9 @@ affs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
 int
 affs_rmdir(struct inode *dir, struct dentry *dentry)
 {
-       pr_debug("%s(dir=%u, %lu \"%.*s\")\n",
+       pr_debug("%s(dir=%u, %lu \"%pd\")\n",
                __func__, (u32)dir->i_ino, dentry->d_inode->i_ino,
-                (int)dentry->d_name.len, dentry->d_name.name);
+                dentry);
 
        return affs_remove_header(dentry);
 }
@@ -338,9 +334,8 @@ affs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
        int                      i, maxlen, error;
        char                     c, lc;
 
-       pr_debug("%s(%lu,\"%.*s\" -> \"%s\")\n",
-                __func__, dir->i_ino, (int)dentry->d_name.len,
-                dentry->d_name.name, symname);
+       pr_debug("%s(%lu,\"%pd\" -> \"%s\")\n",
+                __func__, dir->i_ino, dentry, symname);
 
        maxlen = AFFS_SB(sb)->s_hashsize * sizeof(u32) - 1;
        inode  = affs_new_inode(dir);
@@ -409,9 +404,9 @@ affs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
 {
        struct inode *inode = old_dentry->d_inode;
 
-       pr_debug("%s(%u, %u, \"%.*s\")\n",
+       pr_debug("%s(%u, %u, \"%pd\")\n",
                 __func__, (u32)inode->i_ino, (u32)dir->i_ino,
-                (int)dentry->d_name.len,dentry->d_name.name);
+                dentry);
 
        return affs_add_entry(dir, inode, dentry, ST_LINKFILE);
 }
@@ -424,10 +419,9 @@ affs_rename(struct inode *old_dir, struct dentry *old_dentry,
        struct buffer_head *bh = NULL;
        int retval;
 
-       pr_debug("%s(old=%u,\"%*s\" to new=%u,\"%*s\")\n",
-                __func__, (u32)old_dir->i_ino, (int)old_dentry->d_name.len,
-                old_dentry->d_name.name, (u32)new_dir->i_ino,
-               (int)new_dentry->d_name.len, new_dentry->d_name.name);
+       pr_debug("%s(old=%u,\"%pd\" to new=%u,\"%pd\")\n",
+                __func__, (u32)old_dir->i_ino, old_dentry,
+                (u32)new_dir->i_ino, new_dentry);
 
        retval = affs_check_name(new_dentry->d_name.name,
                                 new_dentry->d_name.len,
index d452f3de54349407afd598319b4b5c9e76e811ed..4ec35e9130e1d7d2731ca381edbcc119b13da5a4 100644 (file)
@@ -434,7 +434,7 @@ static int afs_do_lookup(struct inode *dir, struct dentry *dentry,
        };
        int ret;
 
-       _enter("{%lu},%p{%s},", dir->i_ino, dentry, dentry->d_name.name);
+       _enter("{%lu},%p{%pd},", dir->i_ino, dentry, dentry);
 
        /* search the directory */
        ret = afs_dir_iterate(dir, &cookie.ctx, key);
@@ -466,8 +466,8 @@ static struct inode *afs_try_auto_mntpt(
        struct afs_vnode *vnode = AFS_FS_I(dir);
        struct inode *inode;
 
-       _enter("%d, %p{%s}, {%x:%u}, %p",
-              ret, dentry, devname, vnode->fid.vid, vnode->fid.vnode, key);
+       _enter("%d, %p{%pd}, {%x:%u}, %p",
+              ret, dentry, dentry, vnode->fid.vid, vnode->fid.vnode, key);
 
        if (ret != -ENOENT ||
            !test_bit(AFS_VNODE_AUTOCELL, &vnode->flags))
@@ -502,8 +502,8 @@ static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry,
 
        vnode = AFS_FS_I(dir);
 
-       _enter("{%x:%u},%p{%s},",
-              vnode->fid.vid, vnode->fid.vnode, dentry, dentry->d_name.name);
+       _enter("{%x:%u},%p{%pd},",
+              vnode->fid.vid, vnode->fid.vnode, dentry, dentry);
 
        ASSERTCMP(dentry->d_inode, ==, NULL);
 
@@ -589,11 +589,11 @@ static int afs_d_revalidate(struct dentry *dentry, unsigned int flags)
        vnode = AFS_FS_I(dentry->d_inode);
 
        if (dentry->d_inode)
-               _enter("{v={%x:%u} n=%s fl=%lx},",
-                      vnode->fid.vid, vnode->fid.vnode, dentry->d_name.name,
+               _enter("{v={%x:%u} n=%pd fl=%lx},",
+                      vnode->fid.vid, vnode->fid.vnode, dentry,
                       vnode->flags);
        else
-               _enter("{neg n=%s}", dentry->d_name.name);
+               _enter("{neg n=%pd}", dentry);
 
        key = afs_request_key(AFS_FS_S(dentry->d_sb)->volume->cell);
        if (IS_ERR(key))
@@ -608,7 +608,7 @@ static int afs_d_revalidate(struct dentry *dentry, unsigned int flags)
                afs_validate(dir, key);
 
        if (test_bit(AFS_VNODE_DELETED, &dir->flags)) {
-               _debug("%s: parent dir deleted", dentry->d_name.name);
+               _debug("%pd: parent dir deleted", dentry);
                goto out_bad;
        }
 
@@ -626,16 +626,16 @@ static int afs_d_revalidate(struct dentry *dentry, unsigned int flags)
                if (!dentry->d_inode)
                        goto out_bad;
                if (is_bad_inode(dentry->d_inode)) {
-                       printk("kAFS: afs_d_revalidate: %s/%s has bad inode\n",
-                              parent->d_name.name, dentry->d_name.name);
+                       printk("kAFS: afs_d_revalidate: %pd2 has bad inode\n",
+                              dentry);
                        goto out_bad;
                }
 
                /* if the vnode ID has changed, then the dirent points to a
                 * different file */
                if (fid.vnode != vnode->fid.vnode) {
-                       _debug("%s: dirent changed [%u != %u]",
-                              dentry->d_name.name, fid.vnode,
+                       _debug("%pd: dirent changed [%u != %u]",
+                              dentry, fid.vnode,
                               vnode->fid.vnode);
                        goto not_found;
                }
@@ -644,8 +644,8 @@ static int afs_d_revalidate(struct dentry *dentry, unsigned int flags)
                 * been deleted and replaced, and the original vnode ID has
                 * been reused */
                if (fid.unique != vnode->fid.unique) {
-                       _debug("%s: file deleted (uq %u -> %u I:%u)",
-                              dentry->d_name.name, fid.unique,
+                       _debug("%pd: file deleted (uq %u -> %u I:%u)",
+                              dentry, fid.unique,
                               vnode->fid.unique,
                               dentry->d_inode->i_generation);
                        spin_lock(&vnode->lock);
@@ -657,14 +657,14 @@ static int afs_d_revalidate(struct dentry *dentry, unsigned int flags)
 
        case -ENOENT:
                /* the filename is unknown */
-               _debug("%s: dirent not found", dentry->d_name.name);
+               _debug("%pd: dirent not found", dentry);
                if (dentry->d_inode)
                        goto not_found;
                goto out_valid;
 
        default:
-               _debug("failed to iterate dir %s: %d",
-                      parent->d_name.name, ret);
+               _debug("failed to iterate dir %pd: %d",
+                      parent, ret);
                goto out_bad;
        }
 
@@ -682,8 +682,7 @@ not_found:
        spin_unlock(&dentry->d_lock);
 
 out_bad:
-       _debug("dropping dentry %s/%s",
-              parent->d_name.name, dentry->d_name.name);
+       _debug("dropping dentry %pd2", dentry);
        dput(parent);
        key_put(key);
 
@@ -699,7 +698,7 @@ out_bad:
  */
 static int afs_d_delete(const struct dentry *dentry)
 {
-       _enter("%s", dentry->d_name.name);
+       _enter("%pd", dentry);
 
        if (dentry->d_flags & DCACHE_NFSFS_RENAMED)
                goto zap;
@@ -722,7 +721,7 @@ zap:
  */
 static void afs_d_release(struct dentry *dentry)
 {
-       _enter("%s", dentry->d_name.name);
+       _enter("%pd", dentry);
 }
 
 /*
@@ -741,8 +740,8 @@ static int afs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
 
        dvnode = AFS_FS_I(dir);
 
-       _enter("{%x:%u},{%s},%ho",
-              dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name, mode);
+       _enter("{%x:%u},{%pd},%ho",
+              dvnode->fid.vid, dvnode->fid.vnode, dentry, mode);
 
        key = afs_request_key(dvnode->volume->cell);
        if (IS_ERR(key)) {
@@ -802,8 +801,8 @@ static int afs_rmdir(struct inode *dir, struct dentry *dentry)
 
        dvnode = AFS_FS_I(dir);
 
-       _enter("{%x:%u},{%s}",
-              dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name);
+       _enter("{%x:%u},{%pd}",
+              dvnode->fid.vid, dvnode->fid.vnode, dentry);
 
        key = afs_request_key(dvnode->volume->cell);
        if (IS_ERR(key)) {
@@ -844,8 +843,8 @@ static int afs_unlink(struct inode *dir, struct dentry *dentry)
 
        dvnode = AFS_FS_I(dir);
 
-       _enter("{%x:%u},{%s}",
-              dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name);
+       _enter("{%x:%u},{%pd}",
+              dvnode->fid.vid, dvnode->fid.vnode, dentry);
 
        ret = -ENAMETOOLONG;
        if (dentry->d_name.len >= AFSNAMEMAX)
@@ -918,8 +917,8 @@ static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
 
        dvnode = AFS_FS_I(dir);
 
-       _enter("{%x:%u},{%s},%ho,",
-              dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name, mode);
+       _enter("{%x:%u},{%pd},%ho,",
+              dvnode->fid.vid, dvnode->fid.vnode, dentry, mode);
 
        key = afs_request_key(dvnode->volume->cell);
        if (IS_ERR(key)) {
@@ -981,10 +980,10 @@ static int afs_link(struct dentry *from, struct inode *dir,
        vnode = AFS_FS_I(from->d_inode);
        dvnode = AFS_FS_I(dir);
 
-       _enter("{%x:%u},{%x:%u},{%s}",
+       _enter("{%x:%u},{%x:%u},{%pd}",
               vnode->fid.vid, vnode->fid.vnode,
               dvnode->fid.vid, dvnode->fid.vnode,
-              dentry->d_name.name);
+              dentry);
 
        key = afs_request_key(dvnode->volume->cell);
        if (IS_ERR(key)) {
@@ -1026,8 +1025,8 @@ static int afs_symlink(struct inode *dir, struct dentry *dentry,
 
        dvnode = AFS_FS_I(dir);
 
-       _enter("{%x:%u},{%s},%s",
-              dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name,
+       _enter("{%x:%u},{%pd},%s",
+              dvnode->fid.vid, dvnode->fid.vnode, dentry,
               content);
 
        ret = -EINVAL;
@@ -1094,11 +1093,11 @@ static int afs_rename(struct inode *old_dir, struct dentry *old_dentry,
        orig_dvnode = AFS_FS_I(old_dir);
        new_dvnode = AFS_FS_I(new_dir);
 
-       _enter("{%x:%u},{%x:%u},{%x:%u},{%s}",
+       _enter("{%x:%u},{%x:%u},{%x:%u},{%pd}",
               orig_dvnode->fid.vid, orig_dvnode->fid.vnode,
               vnode->fid.vid, vnode->fid.vnode,
               new_dvnode->fid.vid, new_dvnode->fid.vnode,
-              new_dentry->d_name.name);
+              new_dentry);
 
        key = afs_request_key(orig_dvnode->volume->cell);
        if (IS_ERR(key)) {
index 294671288449dede16169415fd4de9b00d95a457..8a1d38ef0fc203678883493a672c0f638f94a107 100644 (file)
@@ -462,8 +462,8 @@ int afs_setattr(struct dentry *dentry, struct iattr *attr)
        struct key *key;
        int ret;
 
-       _enter("{%x:%u},{n=%s},%x",
-              vnode->fid.vid, vnode->fid.vnode, dentry->d_name.name,
+       _enter("{%x:%u},{n=%pd},%x",
+              vnode->fid.vid, vnode->fid.vnode, dentry,
               attr->ia_valid);
 
        if (!(attr->ia_valid & (ATTR_SIZE | ATTR_MODE | ATTR_UID | ATTR_GID |
index 9682c33d5daf44d66351ca29ebb5c02cb39ca1ae..938c5ab06d5a2d875f22963a267b7e976ef5f339 100644 (file)
@@ -106,14 +106,7 @@ static struct dentry *afs_mntpt_lookup(struct inode *dir,
                                       struct dentry *dentry,
                                       unsigned int flags)
 {
-       _enter("%p,%p{%p{%s},%s}",
-              dir,
-              dentry,
-              dentry->d_parent,
-              dentry->d_parent ?
-              dentry->d_parent->d_name.name : (const unsigned char *) "",
-              dentry->d_name.name);
-
+       _enter("%p,%p{%pd2}", dir, dentry, dentry);
        return ERR_PTR(-EREMOTE);
 }
 
@@ -122,14 +115,7 @@ static struct dentry *afs_mntpt_lookup(struct inode *dir,
  */
 static int afs_mntpt_open(struct inode *inode, struct file *file)
 {
-       _enter("%p,%p{%p{%s},%s}",
-              inode, file,
-              file->f_path.dentry->d_parent,
-              file->f_path.dentry->d_parent ?
-              file->f_path.dentry->d_parent->d_name.name :
-              (const unsigned char *) "",
-              file->f_path.dentry->d_name.name);
-
+       _enter("%p,%p{%pD2}", inode, file, file);
        return -EREMOTE;
 }
 
@@ -146,7 +132,7 @@ static struct vfsmount *afs_mntpt_do_automount(struct dentry *mntpt)
        bool rwpath = false;
        int ret;
 
-       _enter("{%s}", mntpt->d_name.name);
+       _enter("{%pd}", mntpt);
 
        BUG_ON(!mntpt->d_inode);
 
@@ -242,7 +228,7 @@ struct vfsmount *afs_d_automount(struct path *path)
 {
        struct vfsmount *newmnt;
 
-       _enter("{%s}", path->dentry->d_name.name);
+       _enter("{%pd}", path->dentry);
 
        newmnt = afs_mntpt_do_automount(path->dentry);
        if (IS_ERR(newmnt))
index ab6adfd525168800524349791c061512a47a7d81..d148138325c375658322ad9ec3cd376dceb96e8f 100644 (file)
@@ -688,8 +688,8 @@ int afs_fsync(struct file *file, loff_t start, loff_t end, int datasync)
        struct afs_vnode *vnode = AFS_FS_I(dentry->d_inode);
        int ret;
 
-       _enter("{%x:%u},{n=%s},%d",
-              vnode->fid.vid, vnode->fid.vnode, dentry->d_name.name,
+       _enter("{%x:%u},{n=%pd},%d",
+              vnode->fid.vid, vnode->fid.vnode, dentry,
               datasync);
 
        ret = filemap_write_and_wait_range(inode->i_mapping, start, end);
index dcdec6fd33c6fc110fda6ab5e3a277dfad28793c..bfdbaba9c2ba40e7216d7435d69d45016c9ec5ff 100644 (file)
@@ -41,8 +41,7 @@ static int autofs4_mount_busy(struct vfsmount *mnt, struct dentry *dentry)
        struct path path = {.mnt = mnt, .dentry = dentry};
        int status = 1;
 
-       DPRINTK("dentry %p %.*s",
-               dentry, (int)dentry->d_name.len, dentry->d_name.name);
+       DPRINTK("dentry %p %pd", dentry, dentry);
 
        path_get(&path);
 
@@ -192,8 +191,7 @@ static int autofs4_direct_busy(struct vfsmount *mnt,
                                unsigned long timeout,
                                int do_now)
 {
-       DPRINTK("top %p %.*s",
-               top, (int) top->d_name.len, top->d_name.name);
+       DPRINTK("top %p %pd", top, top);
 
        /* If it's busy update the expiry counters */
        if (!may_umount_tree(mnt)) {
@@ -221,8 +219,7 @@ static int autofs4_tree_busy(struct vfsmount *mnt,
        struct autofs_info *top_ino = autofs4_dentry_ino(top);
        struct dentry *p;
 
-       DPRINTK("top %p %.*s",
-               top, (int)top->d_name.len, top->d_name.name);
+       DPRINTK("top %p %pd", top, top);
 
        /* Negative dentry - give up */
        if (!simple_positive(top))
@@ -230,8 +227,7 @@ static int autofs4_tree_busy(struct vfsmount *mnt,
 
        p = NULL;
        while ((p = get_next_positive_dentry(p, top))) {
-               DPRINTK("dentry %p %.*s",
-                       p, (int) p->d_name.len, p->d_name.name);
+               DPRINTK("dentry %p %pd", p, p);
 
                /*
                 * Is someone visiting anywhere in the subtree ?
@@ -277,13 +273,11 @@ static struct dentry *autofs4_check_leaves(struct vfsmount *mnt,
 {
        struct dentry *p;
 
-       DPRINTK("parent %p %.*s",
-               parent, (int)parent->d_name.len, parent->d_name.name);
+       DPRINTK("parent %p %pd", parent, parent);
 
        p = NULL;
        while ((p = get_next_positive_dentry(p, parent))) {
-               DPRINTK("dentry %p %.*s",
-                       p, (int) p->d_name.len, p->d_name.name);
+               DPRINTK("dentry %p %pd", p, p);
 
                if (d_mountpoint(p)) {
                        /* Can we umount this guy */
@@ -368,8 +362,7 @@ static struct dentry *should_expire(struct dentry *dentry,
         *         offset (autofs-5.0+).
         */
        if (d_mountpoint(dentry)) {
-               DPRINTK("checking mountpoint %p %.*s",
-                       dentry, (int)dentry->d_name.len, dentry->d_name.name);
+               DPRINTK("checking mountpoint %p %pd", dentry, dentry);
 
                /* Can we umount this guy */
                if (autofs4_mount_busy(mnt, dentry))
@@ -382,8 +375,7 @@ static struct dentry *should_expire(struct dentry *dentry,
        }
 
        if (dentry->d_inode && S_ISLNK(dentry->d_inode->i_mode)) {
-               DPRINTK("checking symlink %p %.*s",
-                       dentry, (int)dentry->d_name.len, dentry->d_name.name);
+               DPRINTK("checking symlink %p %pd", dentry, dentry);
                /*
                 * A symlink can't be "busy" in the usual sense so
                 * just check last used for expire timeout.
@@ -479,8 +471,7 @@ struct dentry *autofs4_expire_indirect(struct super_block *sb,
        return NULL;
 
 found:
-       DPRINTK("returning %p %.*s",
-               expired, (int)expired->d_name.len, expired->d_name.name);
+       DPRINTK("returning %p %pd", expired, expired);
        ino->flags |= AUTOFS_INF_EXPIRING;
        smp_mb();
        ino->flags &= ~AUTOFS_INF_NO_RCU;
@@ -512,8 +503,7 @@ int autofs4_expire_wait(struct dentry *dentry, int rcu_walk)
        if (ino->flags & AUTOFS_INF_EXPIRING) {
                spin_unlock(&sbi->fs_lock);
 
-               DPRINTK("waiting for expire %p name=%.*s",
-                        dentry, dentry->d_name.len, dentry->d_name.name);
+               DPRINTK("waiting for expire %p name=%pd", dentry, dentry);
 
                status = autofs4_wait(sbi, dentry, NFY_NONE);
                wait_for_completion(&ino->expire_complete);
index 0822c9eacc56db0c38f487fec493addbeef01308..dbb5b7212ce162130727256d49351e3f2d2677c9 100644 (file)
@@ -108,8 +108,7 @@ static int autofs4_dir_open(struct inode *inode, struct file *file)
        struct dentry *dentry = file->f_path.dentry;
        struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb);
 
-       DPRINTK("file=%p dentry=%p %.*s",
-               file, dentry, dentry->d_name.len, dentry->d_name.name);
+       DPRINTK("file=%p dentry=%p %pD", file, dentry, dentry);
 
        if (autofs4_oz_mode(sbi))
                goto out;
@@ -279,8 +278,7 @@ static int autofs4_mount_wait(struct dentry *dentry, bool rcu_walk)
        if (ino->flags & AUTOFS_INF_PENDING) {
                if (rcu_walk)
                        return -ECHILD;
-               DPRINTK("waiting for mount name=%.*s",
-                       dentry->d_name.len, dentry->d_name.name);
+               DPRINTK("waiting for mount name=%pd", dentry);
                status = autofs4_wait(sbi, dentry, NFY_MOUNT);
                DPRINTK("mount wait done status=%d", status);
        }
@@ -340,8 +338,7 @@ static struct vfsmount *autofs4_d_automount(struct path *path)
        struct autofs_info *ino = autofs4_dentry_ino(dentry);
        int status;
 
-       DPRINTK("dentry=%p %.*s",
-               dentry, dentry->d_name.len, dentry->d_name.name);
+       DPRINTK("dentry=%p %pd", dentry, dentry);
 
        /* The daemon never triggers a mount. */
        if (autofs4_oz_mode(sbi))
@@ -428,8 +425,7 @@ static int autofs4_d_manage(struct dentry *dentry, bool rcu_walk)
        struct autofs_info *ino = autofs4_dentry_ino(dentry);
        int status;
 
-       DPRINTK("dentry=%p %.*s",
-               dentry, dentry->d_name.len, dentry->d_name.name);
+       DPRINTK("dentry=%p %pd", dentry, dentry);
 
        /* The daemon never waits. */
        if (autofs4_oz_mode(sbi)) {
@@ -504,7 +500,7 @@ static struct dentry *autofs4_lookup(struct inode *dir, struct dentry *dentry, u
        struct autofs_info *ino;
        struct dentry *active;
 
-       DPRINTK("name = %.*s", dentry->d_name.len, dentry->d_name.name);
+       DPRINTK("name = %pd", dentry);
 
        /* File name too long to exist */
        if (dentry->d_name.len > NAME_MAX)
@@ -558,8 +554,7 @@ static int autofs4_dir_symlink(struct inode *dir,
        size_t size = strlen(symname);
        char *cp;
 
-       DPRINTK("%s <- %.*s", symname,
-               dentry->d_name.len, dentry->d_name.name);
+       DPRINTK("%s <- %pd", symname, dentry);
 
        if (!autofs4_oz_mode(sbi))
                return -EACCES;
@@ -701,8 +696,7 @@ static int autofs4_dir_rmdir(struct inode *dir, struct dentry *dentry)
        struct autofs_info *ino = autofs4_dentry_ino(dentry);
        struct autofs_info *p_ino;
        
-       DPRINTK("dentry %p, removing %.*s",
-               dentry, dentry->d_name.len, dentry->d_name.name);
+       DPRINTK("dentry %p, removing %pd", dentry, dentry);
 
        if (!autofs4_oz_mode(sbi))
                return -EACCES;
@@ -744,8 +738,7 @@ static int autofs4_dir_mkdir(struct inode *dir, struct dentry *dentry, umode_t m
        if (!autofs4_oz_mode(sbi))
                return -EACCES;
 
-       DPRINTK("dentry %p, creating %.*s",
-               dentry, dentry->d_name.len, dentry->d_name.name);
+       DPRINTK("dentry %p, creating %pd", dentry, dentry);
 
        BUG_ON(!ino);
 
index 4cf61ec6b7a8ee539e0caa63d548f8aa4222ad0f..b94d1cc9cd3037db7608b5b25023866900e353d5 100644 (file)
@@ -172,8 +172,8 @@ befs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
        char *utfname;
        const char *name = dentry->d_name.name;
 
-       befs_debug(sb, "---> %s name %s inode %ld", __func__,
-                  dentry->d_name.name, dir->i_ino);
+       befs_debug(sb, "---> %s name %pd inode %ld", __func__,
+                  dentry, dir->i_ino);
 
        /* Convert to UTF-8 */
        if (BEFS_SB(sb)->nls) {
@@ -191,8 +191,7 @@ befs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
        }
 
        if (ret == BEFS_BT_NOT_FOUND) {
-               befs_debug(sb, "<--- %s %s not found", __func__,
-                          dentry->d_name.name);
+               befs_debug(sb, "<--- %s %pd not found", __func__, dentry);
                return ERR_PTR(-ENOENT);
 
        } else if (ret != BEFS_OK || offset == 0) {
@@ -222,10 +221,9 @@ befs_readdir(struct file *file, struct dir_context *ctx)
        size_t keysize;
        unsigned char d_type;
        char keybuf[BEFS_NAME_LEN + 1];
-       const char *dirname = file->f_path.dentry->d_name.name;
 
-       befs_debug(sb, "---> %s name %s, inode %ld, ctx->pos %lld",
-                 __func__, dirname, inode->i_ino, ctx->pos);
+       befs_debug(sb, "---> %s name %pD, inode %ld, ctx->pos %lld",
+                 __func__, file, inode->i_ino, ctx->pos);
 
 more:
        result = befs_btree_read(sb, ds, ctx->pos, BEFS_NAME_LEN + 1,
@@ -233,8 +231,8 @@ more:
 
        if (result == BEFS_ERR) {
                befs_debug(sb, "<--- %s ERROR", __func__);
-               befs_error(sb, "IO error reading %s (inode %lu)",
-                          dirname, inode->i_ino);
+               befs_error(sb, "IO error reading %pD (inode %lu)",
+                          file, inode->i_ino);
                return -EIO;
 
        } else if (result == BEFS_BT_END) {
index 929dec08c348ec01ada445e218f8a1bde05d58f9..4c556680fa749fa388710eb09b7b822e07a6c977 100644 (file)
@@ -292,8 +292,8 @@ static int load_aout_binary(struct linux_binprm * bprm)
                if ((fd_offset & ~PAGE_MASK) != 0 && printk_ratelimit())
                {
                        printk(KERN_WARNING 
-                              "fd_offset is not page aligned. Please convert program: %s\n",
-                              bprm->file->f_path.dentry->d_name.name);
+                              "fd_offset is not page aligned. Please convert program: %pD\n",
+                              bprm->file);
                }
 
                if (!bprm->file->f_op->mmap||((fd_offset & ~PAGE_MASK) != 0)) {
@@ -375,8 +375,8 @@ static int load_aout_library(struct file *file)
                if (printk_ratelimit())
                {
                        printk(KERN_WARNING 
-                              "N_TXTOFF is not page aligned. Please convert library: %s\n",
-                              file->f_path.dentry->d_name.name);
+                              "N_TXTOFF is not page aligned. Please convert library: %pD\n",
+                              file);
                }
                vm_brk(start_addr, ex.a_text + ex.a_data + ex.a_bss);
                
index e12f189d539b62e5e1bda1c8c28f3a9df0fe44db..7f8e83f9d74eb87712db9e8fdc7da95fcccaefdb 100644 (file)
@@ -102,8 +102,7 @@ static void cachefiles_mark_object_buried(struct cachefiles_cache *cache,
        struct cachefiles_object *object;
        struct rb_node *p;
 
-       _enter(",'%*.*s'",
-              dentry->d_name.len, dentry->d_name.len, dentry->d_name.name);
+       _enter(",'%pd'", dentry);
 
        write_lock(&cache->active_lock);
 
@@ -273,9 +272,7 @@ static int cachefiles_bury_object(struct cachefiles_cache *cache,
        char nbuffer[8 + 8 + 1];
        int ret;
 
-       _enter(",'%*.*s','%*.*s'",
-              dir->d_name.len, dir->d_name.len, dir->d_name.name,
-              rep->d_name.len, rep->d_name.len, rep->d_name.name);
+       _enter(",'%pd','%pd'", dir, rep);
 
        _debug("remove %p from %p", rep, dir);
 
@@ -597,8 +594,7 @@ lookup_again:
        /* if we've found that the terminal object exists, then we need to
         * check its attributes and delete it if it's out of date */
        if (!object->new) {
-               _debug("validate '%*.*s'",
-                      next->d_name.len, next->d_name.len, next->d_name.name);
+               _debug("validate '%pd'", next);
 
                ret = cachefiles_check_object_xattr(object, auxdata);
                if (ret == -ESTALE) {
@@ -827,8 +823,8 @@ static struct dentry *cachefiles_check_active(struct cachefiles_cache *cache,
        unsigned long start;
        int ret;
 
-       //_enter(",%*.*s/,%s",
-       //       dir->d_name.len, dir->d_name.len, dir->d_name.name, filename);
+       //_enter(",%pd/,%s",
+       //       dir, filename);
 
        /* look up the victim */
        mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_PARENT);
@@ -910,8 +906,7 @@ int cachefiles_cull(struct cachefiles_cache *cache, struct dentry *dir,
        struct dentry *victim;
        int ret;
 
-       _enter(",%*.*s/,%s",
-              dir->d_name.len, dir->d_name.len, dir->d_name.name, filename);
+       _enter(",%pd/,%s", dir, filename);
 
        victim = cachefiles_check_active(cache, dir, filename);
        if (IS_ERR(victim))
@@ -969,8 +964,8 @@ int cachefiles_check_in_use(struct cachefiles_cache *cache, struct dentry *dir,
 {
        struct dentry *victim;
 
-       //_enter(",%*.*s/,%s",
-       //       dir->d_name.len, dir->d_name.len, dir->d_name.name, filename);
+       //_enter(",%pd/,%s",
+       //       dir, filename);
 
        victim = cachefiles_check_active(cache, dir, filename);
        if (IS_ERR(victim))
index acbc1f094fb1a418ed489538c85122c609052bd0..a8a68745e11d45b0c093501e359d1190546f788b 100644 (file)
@@ -51,9 +51,8 @@ int cachefiles_check_object_type(struct cachefiles_object *object)
        }
 
        if (ret != -EEXIST) {
-               pr_err("Can't set xattr on %*.*s [%lu] (err %d)\n",
-                      dentry->d_name.len, dentry->d_name.len,
-                      dentry->d_name.name, dentry->d_inode->i_ino,
+               pr_err("Can't set xattr on %pd [%lu] (err %d)\n",
+                      dentry, dentry->d_inode->i_ino,
                       -ret);
                goto error;
        }
@@ -64,9 +63,8 @@ int cachefiles_check_object_type(struct cachefiles_object *object)
                if (ret == -ERANGE)
                        goto bad_type_length;
 
-               pr_err("Can't read xattr on %*.*s [%lu] (err %d)\n",
-                      dentry->d_name.len, dentry->d_name.len,
-                      dentry->d_name.name, dentry->d_inode->i_ino,
+               pr_err("Can't read xattr on %pd [%lu] (err %d)\n",
+                      dentry, dentry->d_inode->i_ino,
                       -ret);
                goto error;
        }
@@ -92,9 +90,8 @@ bad_type_length:
 
 bad_type:
        xtype[2] = 0;
-       pr_err("Cache object %*.*s [%lu] type %s not %s\n",
-              dentry->d_name.len, dentry->d_name.len,
-              dentry->d_name.name, dentry->d_inode->i_ino,
+       pr_err("Cache object %pd [%lu] type %s not %s\n",
+              dentry, dentry->d_inode->i_ino,
               xtype, type);
        ret = -EIO;
        goto error;
index 5d5a4c8c8496588c0c749abdb53ebf0b1be2e31e..1b2355109b9fd13faa3141ecc1cd75bbe28881c1 100644 (file)
@@ -83,10 +83,9 @@ static int mdsc_show(struct seq_file *s, void *p)
                        if (IS_ERR(path))
                                path = NULL;
                        spin_lock(&req->r_dentry->d_lock);
-                       seq_printf(s, " #%llx/%.*s (%s)",
+                       seq_printf(s, " #%llx/%pd (%s)",
                                   ceph_ino(req->r_dentry->d_parent->d_inode),
-                                  req->r_dentry->d_name.len,
-                                  req->r_dentry->d_name.name,
+                                  req->r_dentry,
                                   path ? path : "");
                        spin_unlock(&req->r_dentry->d_lock);
                        kfree(path);
@@ -103,11 +102,10 @@ static int mdsc_show(struct seq_file *s, void *p)
                        if (IS_ERR(path))
                                path = NULL;
                        spin_lock(&req->r_old_dentry->d_lock);
-                       seq_printf(s, " #%llx/%.*s (%s)",
+                       seq_printf(s, " #%llx/%pd (%s)",
                                   req->r_old_dentry_dir ?
                                   ceph_ino(req->r_old_dentry_dir) : 0,
-                                  req->r_old_dentry->d_name.len,
-                                  req->r_old_dentry->d_name.name,
+                                  req->r_old_dentry,
                                   path ? path : "");
                        spin_unlock(&req->r_old_dentry->d_lock);
                        kfree(path);
@@ -150,8 +148,8 @@ static int dentry_lru_show(struct seq_file *s, void *ptr)
        spin_lock(&mdsc->dentry_lru_lock);
        list_for_each_entry(di, &mdsc->dentry_lru, lru) {
                struct dentry *dentry = di->dentry;
-               seq_printf(s, "%p %p\t%.*s\n",
-                          di, dentry, dentry->d_name.len, dentry->d_name.name);
+               seq_printf(s, "%p %p\t%pd\n",
+                          di, dentry, dentry);
        }
        spin_unlock(&mdsc->dentry_lru_lock);
 
index 695e7888fef8f573e70dd1690c3684ce3c7eb094..766ec35f988e0cd4f70d75d0d2242b6174d53bb1 100644 (file)
@@ -168,8 +168,8 @@ more:
                    ceph_ino(dentry->d_inode) != CEPH_INO_CEPH &&
                    fpos_cmp(ctx->pos, di->offset) <= 0)
                        break;
-               dout(" skipping %p %.*s at %llu (%llu)%s%s\n", dentry,
-                    dentry->d_name.len, dentry->d_name.name, di->offset,
+               dout(" skipping %p %pd at %llu (%llu)%s%s\n", dentry,
+                    dentry, di->offset,
                     ctx->pos, d_unhashed(dentry) ? " unhashed" : "",
                     !dentry->d_inode ? " null" : "");
                spin_unlock(&dentry->d_lock);
@@ -190,8 +190,8 @@ more:
                goto out;
        }
 
-       dout(" %llu (%llu) dentry %p %.*s %p\n", di->offset, ctx->pos,
-            dentry, dentry->d_name.len, dentry->d_name.name, dentry->d_inode);
+       dout(" %llu (%llu) dentry %p %pd %p\n", di->offset, ctx->pos,
+            dentry, dentry, dentry->d_inode);
        if (!dir_emit(ctx, dentry->d_name.name,
                      dentry->d_name.len,
                      ceph_translate_ino(dentry->d_sb, dentry->d_inode->i_ino),
@@ -538,8 +538,8 @@ int ceph_handle_snapdir(struct ceph_mds_request *req,
            strcmp(dentry->d_name.name,
                   fsc->mount_options->snapdir_name) == 0) {
                struct inode *inode = ceph_get_snapdir(parent);
-               dout("ENOENT on snapdir %p '%.*s', linking to snapdir %p\n",
-                    dentry, dentry->d_name.len, dentry->d_name.name, inode);
+               dout("ENOENT on snapdir %p '%pd', linking to snapdir %p\n",
+                    dentry, dentry, inode);
                BUG_ON(!d_unhashed(dentry));
                d_add(dentry, inode);
                err = 0;
@@ -603,8 +603,8 @@ static struct dentry *ceph_lookup(struct inode *dir, struct dentry *dentry,
        int op;
        int err;
 
-       dout("lookup %p dentry %p '%.*s'\n",
-            dir, dentry, dentry->d_name.len, dentry->d_name.name);
+       dout("lookup %p dentry %p '%pd'\n",
+            dir, dentry, dentry);
 
        if (dentry->d_name.len > NAME_MAX)
                return ERR_PTR(-ENAMETOOLONG);
@@ -774,8 +774,8 @@ static int ceph_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
        if (ceph_snap(dir) == CEPH_SNAPDIR) {
                /* mkdir .snap/foo is a MKSNAP */
                op = CEPH_MDS_OP_MKSNAP;
-               dout("mksnap dir %p snap '%.*s' dn %p\n", dir,
-                    dentry->d_name.len, dentry->d_name.name, dentry);
+               dout("mksnap dir %p snap '%pd' dn %p\n", dir,
+                    dentry, dentry);
        } else if (ceph_snap(dir) == CEPH_NOSNAP) {
                dout("mkdir dir %p dn %p mode 0%ho\n", dir, dentry, mode);
                op = CEPH_MDS_OP_MKDIR;
@@ -888,8 +888,7 @@ static int ceph_unlink(struct inode *dir, struct dentry *dentry)
 
        if (ceph_snap(dir) == CEPH_SNAPDIR) {
                /* rmdir .snap/foo is RMSNAP */
-               dout("rmsnap dir %p '%.*s' dn %p\n", dir, dentry->d_name.len,
-                    dentry->d_name.name, dentry);
+               dout("rmsnap dir %p '%pd' dn %p\n", dir, dentry, dentry);
                op = CEPH_MDS_OP_RMSNAP;
        } else if (ceph_snap(dir) == CEPH_NOSNAP) {
                dout("unlink/rmdir dir %p dn %p inode %p\n",
@@ -1063,16 +1062,15 @@ static int ceph_d_revalidate(struct dentry *dentry, unsigned int flags)
        if (flags & LOOKUP_RCU)
                return -ECHILD;
 
-       dout("d_revalidate %p '%.*s' inode %p offset %lld\n", dentry,
-            dentry->d_name.len, dentry->d_name.name, dentry->d_inode,
-            ceph_dentry(dentry)->offset);
+       dout("d_revalidate %p '%pd' inode %p offset %lld\n", dentry,
+            dentry, dentry->d_inode, ceph_dentry(dentry)->offset);
 
        dir = ceph_get_dentry_parent_inode(dentry);
 
        /* always trust cached snapped dentries, snapdir dentry */
        if (ceph_snap(dir) != CEPH_NOSNAP) {
-               dout("d_revalidate %p '%.*s' inode %p is SNAPPED\n", dentry,
-                    dentry->d_name.len, dentry->d_name.name, dentry->d_inode);
+               dout("d_revalidate %p '%pd' inode %p is SNAPPED\n", dentry,
+                    dentry, dentry->d_inode);
                valid = 1;
        } else if (dentry->d_inode &&
                   ceph_snap(dentry->d_inode) == CEPH_SNAPDIR) {
@@ -1265,8 +1263,7 @@ void ceph_dentry_lru_add(struct dentry *dn)
        struct ceph_dentry_info *di = ceph_dentry(dn);
        struct ceph_mds_client *mdsc;
 
-       dout("dentry_lru_add %p %p '%.*s'\n", di, dn,
-            dn->d_name.len, dn->d_name.name);
+       dout("dentry_lru_add %p %p '%pd'\n", di, dn, dn);
        mdsc = ceph_sb_to_client(dn->d_sb)->mdsc;
        spin_lock(&mdsc->dentry_lru_lock);
        list_add_tail(&di->lru, &mdsc->dentry_lru);
@@ -1279,8 +1276,8 @@ void ceph_dentry_lru_touch(struct dentry *dn)
        struct ceph_dentry_info *di = ceph_dentry(dn);
        struct ceph_mds_client *mdsc;
 
-       dout("dentry_lru_touch %p %p '%.*s' (offset %lld)\n", di, dn,
-            dn->d_name.len, dn->d_name.name, di->offset);
+       dout("dentry_lru_touch %p %p '%pd' (offset %lld)\n", di, dn, dn,
+            di->offset);
        mdsc = ceph_sb_to_client(dn->d_sb)->mdsc;
        spin_lock(&mdsc->dentry_lru_lock);
        list_move_tail(&di->lru, &mdsc->dentry_lru);
@@ -1292,8 +1289,7 @@ void ceph_dentry_lru_del(struct dentry *dn)
        struct ceph_dentry_info *di = ceph_dentry(dn);
        struct ceph_mds_client *mdsc;
 
-       dout("dentry_lru_del %p %p '%.*s'\n", di, dn,
-            dn->d_name.len, dn->d_name.name);
+       dout("dentry_lru_del %p %p '%pd'\n", di, dn, dn);
        mdsc = ceph_sb_to_client(dn->d_sb)->mdsc;
        spin_lock(&mdsc->dentry_lru_lock);
        list_del_init(&di->lru);
index d7e0da8366e6a6f4e454ae75e42bcfdb4a063f6e..db2c967950f77e49aca84c27018135d4ddfbfd63 100644 (file)
@@ -238,8 +238,8 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
        struct ceph_acls_info acls = {};
        int err;
 
-       dout("atomic_open %p dentry %p '%.*s' %s flags %d mode 0%o\n",
-            dir, dentry, dentry->d_name.len, dentry->d_name.name,
+       dout("atomic_open %p dentry %p '%pd' %s flags %d mode 0%o\n",
+            dir, dentry, dentry,
             d_unhashed(dentry) ? "unhashed" : "hashed", flags, mode);
 
        if (dentry->d_name.len > NAME_MAX)
index 90ec8e32c1380b22719a647742c38a60a95baf45..a5593d51d035736f9a419fabe30a3fbd5ff40977 100644 (file)
@@ -1186,20 +1186,18 @@ retry_lookup:
                        struct inode *olddir = req->r_old_dentry_dir;
                        BUG_ON(!olddir);
 
-                       dout(" src %p '%.*s' dst %p '%.*s'\n",
+                       dout(" src %p '%pd' dst %p '%pd'\n",
                             req->r_old_dentry,
-                            req->r_old_dentry->d_name.len,
-                            req->r_old_dentry->d_name.name,
-                            dn, dn->d_name.len, dn->d_name.name);
+                            req->r_old_dentry,
+                            dn, dn);
                        dout("fill_trace doing d_move %p -> %p\n",
                             req->r_old_dentry, dn);
 
                        d_move(req->r_old_dentry, dn);
-                       dout(" src %p '%.*s' dst %p '%.*s'\n",
+                       dout(" src %p '%pd' dst %p '%pd'\n",
+                            req->r_old_dentry,
                             req->r_old_dentry,
-                            req->r_old_dentry->d_name.len,
-                            req->r_old_dentry->d_name.name,
-                            dn, dn->d_name.len, dn->d_name.name);
+                            dn, dn);
 
                        /* ensure target dentry is invalidated, despite
                           rehashing bug in vfs_rename_dir */
index 668dcabc5695a3a153f5234cab0f759c7693af5c..c9c298bd3058924b8fed471ccdebabeef2feeb88 100644 (file)
@@ -386,7 +386,7 @@ static void remove_dir(struct dentry * d)
        if (d->d_inode)
                simple_rmdir(parent->d_inode,d);
 
-       pr_debug(" o %s removing done (%d)\n",d->d_name.name, d_count(d));
+       pr_debug(" o %pd removing done (%d)\n", d, d_count(d));
 
        dput(parent);
 }
index caa8d95b24e843581342c80c2552b69d6cfd223f..bf50259012ab7921ecaa7033b9260a9405f577f5 100644 (file)
@@ -1988,7 +1988,7 @@ static int fuse_write_begin(struct file *file, struct address_space *mapping,
                struct page **pagep, void **fsdata)
 {
        pgoff_t index = pos >> PAGE_CACHE_SHIFT;
-       struct fuse_conn *fc = get_fuse_conn(file->f_dentry->d_inode);
+       struct fuse_conn *fc = get_fuse_conn(file_inode(file));
        struct page *page;
        loff_t fsize;
        int err = -ENOMEM;
index d59c7defb1efea8bb46bea33ddffe2c384db390b..38fdc533f4ecba5042f3473d0efe0454b2d52ef3 100644 (file)
@@ -84,7 +84,7 @@ static int jfs_create(struct inode *dip, struct dentry *dentry, umode_t mode,
        struct inode *iplist[2];
        struct tblock *tblk;
 
-       jfs_info("jfs_create: dip:0x%p name:%s", dip, dentry->d_name.name);
+       jfs_info("jfs_create: dip:0x%p name:%pd", dip, dentry);
 
        dquot_initialize(dip);
 
@@ -216,7 +216,7 @@ static int jfs_mkdir(struct inode *dip, struct dentry *dentry, umode_t mode)
        struct inode *iplist[2];
        struct tblock *tblk;
 
-       jfs_info("jfs_mkdir: dip:0x%p name:%s", dip, dentry->d_name.name);
+       jfs_info("jfs_mkdir: dip:0x%p name:%pd", dip, dentry);
 
        dquot_initialize(dip);
 
@@ -352,7 +352,7 @@ static int jfs_rmdir(struct inode *dip, struct dentry *dentry)
        struct inode *iplist[2];
        struct tblock *tblk;
 
-       jfs_info("jfs_rmdir: dip:0x%p name:%s", dip, dentry->d_name.name);
+       jfs_info("jfs_rmdir: dip:0x%p name:%pd", dip, dentry);
 
        /* Init inode for quota operations. */
        dquot_initialize(dip);
@@ -480,7 +480,7 @@ static int jfs_unlink(struct inode *dip, struct dentry *dentry)
        s64 new_size = 0;
        int commit_flag;
 
-       jfs_info("jfs_unlink: dip:0x%p name:%s", dip, dentry->d_name.name);
+       jfs_info("jfs_unlink: dip:0x%p name:%pd", dip, dentry);
 
        /* Init inode for quota operations. */
        dquot_initialize(dip);
@@ -797,8 +797,7 @@ static int jfs_link(struct dentry *old_dentry,
        struct btstack btstack;
        struct inode *iplist[2];
 
-       jfs_info("jfs_link: %s %s", old_dentry->d_name.name,
-                dentry->d_name.name);
+       jfs_info("jfs_link: %pd %pd", old_dentry, dentry);
 
        dquot_initialize(dir);
 
@@ -1082,8 +1081,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
        int commit_flag;
 
 
-       jfs_info("jfs_rename: %s %s", old_dentry->d_name.name,
-                new_dentry->d_name.name);
+       jfs_info("jfs_rename: %pd %pd", old_dentry, new_dentry);
 
        dquot_initialize(old_dir);
        dquot_initialize(new_dir);
@@ -1355,7 +1353,7 @@ static int jfs_mknod(struct inode *dir, struct dentry *dentry,
        if (!new_valid_dev(rdev))
                return -EINVAL;
 
-       jfs_info("jfs_mknod: %s", dentry->d_name.name);
+       jfs_info("jfs_mknod: %pd", dentry);
 
        dquot_initialize(dir);
 
@@ -1444,7 +1442,7 @@ static struct dentry *jfs_lookup(struct inode *dip, struct dentry *dentry, unsig
        struct component_name key;
        int rc;
 
-       jfs_info("jfs_lookup: name = %s", dentry->d_name.name);
+       jfs_info("jfs_lookup: name = %pd", dentry);
 
        if ((rc = get_UCSname(&key, dentry)))
                return ERR_PTR(rc);
index 44d7d0c7e376abb2e0ebc19fdcd671113fe3fb3b..105ccc30572df19d89cd65906ad1e29bb8eaa66a 100644 (file)
@@ -133,7 +133,7 @@ out:
 static int
 nfs_closedir(struct inode *inode, struct file *filp)
 {
-       put_nfs_open_dir_context(filp->f_path.dentry->d_inode, filp->private_data);
+       put_nfs_open_dir_context(file_inode(filp), filp->private_data);
        return 0;
 }
 
index eeea7a90eb873d6d4d8b606ddf2584a1c3a9f85c..b1eed4dd2eab81164d984fc5e29e6a1d5b533a9d 100644 (file)
@@ -1886,7 +1886,7 @@ static __be32 nfsd4_encode_path(struct xdr_stream *xdr,
                        goto out_free;
                }
                p = xdr_encode_opaque(p, dentry->d_name.name, len);
-               dprintk("/%s", dentry->d_name.name);
+               dprintk("/%pd", dentry);
                spin_unlock(&dentry->d_lock);
                dput(dentry);
                ncomponents--;
index 436f36037e094577592576e71054a2cf350a29bb..b3973c2fd19007e01bc7260a72b43e769849dd75 100644 (file)
@@ -111,8 +111,8 @@ static struct dentry *ntfs_lookup(struct inode *dir_ino, struct dentry *dent,
        unsigned long dent_ino;
        int uname_len;
 
-       ntfs_debug("Looking up %s in directory inode 0x%lx.",
-                       dent->d_name.name, dir_ino->i_ino);
+       ntfs_debug("Looking up %pd in directory inode 0x%lx.",
+                       dent, dir_ino->i_ino);
        /* Convert the name of the dentry to Unicode. */
        uname_len = ntfs_nlstoucs(vol, dent->d_name.name, dent->d_name.len,
                        &uname);
index 92edcfc23c1c0f7cabf5066d6dd503ff1b54bd4b..4fda7a5f3088a7144240193508369ba259875a72 100644 (file)
@@ -251,8 +251,8 @@ int ocfs2_dentry_attach_lock(struct dentry *dentry,
 
        if (dl) {
                mlog_bug_on_msg(dl->dl_parent_blkno != parent_blkno,
-                               " \"%.*s\": old parent: %llu, new: %llu\n",
-                               dentry->d_name.len, dentry->d_name.name,
+                               " \"%pd\": old parent: %llu, new: %llu\n",
+                               dentry,
                                (unsigned long long)parent_blkno,
                                (unsigned long long)dl->dl_parent_blkno);
                return 0;
@@ -277,8 +277,8 @@ int ocfs2_dentry_attach_lock(struct dentry *dentry,
                                (unsigned long long)OCFS2_I(inode)->ip_blkno);
 
                mlog_bug_on_msg(dl->dl_parent_blkno != parent_blkno,
-                               " \"%.*s\": old parent: %llu, new: %llu\n",
-                               dentry->d_name.len, dentry->d_name.name,
+                               " \"%pd\": old parent: %llu, new: %llu\n",
+                               dentry,
                                (unsigned long long)parent_blkno,
                                (unsigned long long)dl->dl_parent_blkno);
 
@@ -406,17 +406,15 @@ static void ocfs2_dentry_iput(struct dentry *dentry, struct inode *inode)
                        if (inode)
                                ino = (unsigned long long)OCFS2_I(inode)->ip_blkno;
                        mlog(ML_ERROR, "Dentry is missing cluster lock. "
-                            "inode: %llu, d_flags: 0x%x, d_name: %.*s\n",
-                            ino, dentry->d_flags, dentry->d_name.len,
-                            dentry->d_name.name);
+                            "inode: %llu, d_flags: 0x%x, d_name: %pd\n",
+                            ino, dentry->d_flags, dentry);
                }
 
                goto out;
        }
 
-       mlog_bug_on_msg(dl->dl_count == 0, "dentry: %.*s, count: %u\n",
-                       dentry->d_name.len, dentry->d_name.name,
-                       dl->dl_count);
+       mlog_bug_on_msg(dl->dl_count == 0, "dentry: %pd, count: %u\n",
+                       dentry, dl->dl_count);
 
        ocfs2_dentry_lock_put(OCFS2_SB(dentry->d_sb), dl);
 
index 09b7d9dac71d567d49d4f23d01511ba0a2c5adb1..57c40e34f56feb038297ff2e120e62cb3c44807c 100644 (file)
@@ -565,8 +565,8 @@ static int dlmfs_unlink(struct inode *dir,
         * to acquire a lock, this basically destroys our lockres. */
        status = user_dlm_destroy_lock(&DLMFS_I(inode)->ip_lockres);
        if (status < 0) {
-               mlog(ML_ERROR, "unlink %.*s, error %d from destroy\n",
-                    dentry->d_name.len, dentry->d_name.name, status);
+               mlog(ML_ERROR, "unlink %pd, error %d from destroy\n",
+                    dentry, status);
                goto bail;
        }
        status = simple_unlink(dir, dentry);
index 21262f2b16545df84d4da4b901bd9d5bf9b568cc..37297c14f9a30904d7c5d65c3b7be1ba25a10a13 100644 (file)
@@ -3725,8 +3725,7 @@ static int ocfs2_dentry_convert_worker(struct ocfs2_lock_res *lockres,
                        break;
                spin_unlock(&dentry_attach_lock);
 
-               mlog(0, "d_delete(%.*s);\n", dentry->d_name.len,
-                    dentry->d_name.name);
+               mlog(0, "d_delete(%pd);\n", dentry);
 
                /*
                 * The following dcache calls may do an
index 628248ce2f8b86e32653699a7c8c3bdd46537405..04b06146bae224f0f9177da58fee0c6fd6d3e747 100644 (file)
@@ -210,9 +210,9 @@ fill_with_dentries(struct dir_context *ctx, const char *name, int namelen,
        } else if (!dentry->d_inode) {
                /* A directory entry exists, but no file? */
                reiserfs_error(dentry->d_sb, "xattr-20003",
-                              "Corrupted directory: xattr %s listed but "
-                              "not found for file %s.\n",
-                              dentry->d_name.name, dbuf->xadir->d_name.name);
+                              "Corrupted directory: xattr %pd listed but "
+                              "not found for file %pd.\n",
+                              dentry, dbuf->xadir);
                dput(dentry);
                return -EIO;
        }
index d515ec25ae9fc543d16a3d3eac1ffb7acf3813da..433ae61e7f42e9a17a903a811abbf01f970cdbe8 100644 (file)
@@ -166,9 +166,9 @@ static int smk_bu_file(struct file *file, int mode, int rc)
                return rc;
 
        smk_bu_mode(mode, acc);
-       pr_info("Smack Bringup: (%s %s %s) file=(%s %ld %s) %s\n",
+       pr_info("Smack Bringup: (%s %s %s) file=(%s %ld %pD) %s\n",
                sskp->smk_known, (char *)file->f_security, acc,
-               inode->i_sb->s_id, inode->i_ino, file->f_dentry->d_name.name,
+               inode->i_sb->s_id, inode->i_ino, file,
                current->comm);
        return 0;
 }
@@ -189,9 +189,9 @@ static int smk_bu_credfile(const struct cred *cred, struct file *file,
                return rc;
 
        smk_bu_mode(mode, acc);
-       pr_info("Smack Bringup: (%s %s %s) file=(%s %ld %s) %s\n",
+       pr_info("Smack Bringup: (%s %s %s) file=(%s %ld %pD) %s\n",
                sskp->smk_known, smk_of_inode(inode)->smk_known, acc,
-               inode->i_sb->s_id, inode->i_ino, file->f_dentry->d_name.name,
+               inode->i_sb->s_id, inode->i_ino, file,
                current->comm);
        return 0;
 }