From: Erez Zadok Date: Thu, 12 Dec 2013 04:56:40 +0000 (-0500) Subject: Unionfs: use new %pd printf for printing dentry name X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=3414851fcfb2e2941d5e8e29e50ff154ca53c52a;p=unionfs-latest.git Unionfs: use new %pd printf for printing dentry name Signed-off-by: Erez Zadok --- diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c index 38805a6cce4f..22cda29b48fc 100644 --- a/fs/unionfs/commonfops.c +++ b/fs/unionfs/commonfops.c @@ -107,8 +107,8 @@ retry: counter++; sprintf(suffix, "%*.*x", countersize, countersize, counter); - pr_debug("unionfs: trying to rename %s to %s\n", - dentry->d_name.name, name); + pr_debug("unionfs: trying to rename %pd to %s\n", + dentry, name); tmp_dentry = lookup_lck_len(name, lower_dentry->d_parent, nlen); @@ -426,8 +426,7 @@ out_may_copyup: if (willwrite && IS_WRITE_FLAG(file->f_flags) && !IS_WRITE_FLAG(unionfs_lower_file(file)->f_flags) && is_robranch(dentry)) { - pr_debug("unionfs: do delay copyup of \"%s\"\n", - dentry->d_name.name); + pr_debug("unionfs: do delay copyup of \"%pd\"\n", dentry); err = do_delayed_copyup(file, parent); /* regular files have only one open lower file */ if (!err && !S_ISDIR(dentry->d_inode->i_mode)) @@ -476,8 +475,8 @@ int unionfs_file_revalidate(struct file *file, struct dentry *parent, dgen = atomic_read(&UNIONFS_D(dentry)->generation); if (unlikely(sbgen > dgen)) { /* XXX: should never happen */ - pr_debug("unionfs: failed to revalidate dentry (%s)\n", - dentry->d_name.name); + pr_debug("unionfs: failed to revalidate dentry (%pd)\n", + dentry); err = -ESTALE; goto out; } diff --git a/fs/unionfs/copyup.c b/fs/unionfs/copyup.c index 916528a92198..bf4a77a8d39b 100644 --- a/fs/unionfs/copyup.c +++ b/fs/unionfs/copyup.c @@ -156,8 +156,8 @@ static int copyup_permissions(struct super_block *sb, if (err == -EOPNOTSUPP && S_ISLNK(new_lower_dentry->d_inode->i_mode)) { printk(KERN_WARNING - "unionfs: changing \"%s\" symlink mode unsupported\n", - new_lower_dentry->d_name.name); + "unionfs: changing \"%pd\" symlink mode unsupported\n", + new_lower_dentry); err = 0; } diff --git a/fs/unionfs/debug.c b/fs/unionfs/debug.c index f40b9084cfd7..01d6d5380728 100644 --- a/fs/unionfs/debug.c +++ b/fs/unionfs/debug.c @@ -494,9 +494,9 @@ void __show_dinode_times(const struct dentry *dentry, lower_inode = unionfs_lower_inode_idx(inode, bindex); if (!lower_inode) continue; - pr_debug("DT(%s:%lu:%d): %s:%s:%d " + pr_debug("DT(%pd:%lu:%d): %s:%s:%d " "um=%lu/%lu lm=%lu/%lu uc=%lu/%lu lc=%lu/%lu\n", - dentry->d_name.name, inode->i_ino, bindex, + dentry, inode->i_ino, bindex, file, fxn, line, inode->i_mtime.tv_sec, inode->i_mtime.tv_nsec, lower_inode->i_mtime.tv_sec, diff --git a/fs/unionfs/dentry.c b/fs/unionfs/dentry.c index d4a6a6cd3da3..358750555fc1 100644 --- a/fs/unionfs/dentry.c +++ b/fs/unionfs/dentry.c @@ -266,8 +266,8 @@ bool is_newer_lower(const struct dentry *dentry) if ((lower_inode->i_mtime.tv_sec - inode->i_mtime.tv_sec) > UNIONFS_MIN_CC_TIME) { pr_info("unionfs: new lower inode mtime " - "(bindex=%d, name=%s)\n", bindex, - dentry->d_name.name); + "(bindex=%d, name=%pd)\n", bindex, + dentry); show_dinode_times(dentry); } return true; @@ -277,8 +277,8 @@ bool is_newer_lower(const struct dentry *dentry) if ((lower_inode->i_ctime.tv_sec - inode->i_ctime.tv_sec) > UNIONFS_MIN_CC_TIME) { pr_info("unionfs: new lower inode ctime " - "(bindex=%d, name=%s)\n", bindex, - dentry->d_name.name); + "(bindex=%d, name=%pd)\n", bindex, + dentry); show_dinode_times(dentry); } return true; diff --git a/fs/unionfs/rename.c b/fs/unionfs/rename.c index 155c83de8c94..ec9b54efbf11 100644 --- a/fs/unionfs/rename.c +++ b/fs/unionfs/rename.c @@ -248,8 +248,8 @@ static int do_unionfs_rename(struct inode *old_dir, err = create_whiteout(old_dentry, bindex); if (err) { printk(KERN_ERR "unionfs: can't create a " - "whiteout for %s in rename (err=%d)\n", - old_dentry->d_name.name, err); + "whiteout for %pd in rename (err=%d)\n", + old_dentry, err); continue; } err = __unionfs_rename(old_dir, old_dentry, old_parent, @@ -276,7 +276,7 @@ static int do_unionfs_rename(struct inode *old_dir, if (err) { /* can't fix anything now, so we exit with -EIO */ printk(KERN_ERR "unionfs: can't create a whiteout for " - "%s in rename!\n", old_dentry->d_name.name); + "%pd in rename!\n", old_dentry); err = -EIO; } } diff --git a/fs/unionfs/whiteout.c b/fs/unionfs/whiteout.c index b2753ef280ae..6d5a57f81df5 100644 --- a/fs/unionfs/whiteout.c +++ b/fs/unionfs/whiteout.c @@ -191,8 +191,8 @@ int unlink_whiteout(struct dentry *wh_dentry) err = inode->i_op->unlink(inode, wh_dentry); } if (err) - printk(KERN_ERR "unionfs: could not unlink whiteout %s, " - "err = %d\n", wh_dentry->d_name.name, err); + printk(KERN_ERR "unionfs: could not unlink whiteout %pd, " + "err = %d\n", wh_dentry, err); return err; @@ -236,8 +236,8 @@ int check_unlink_whiteout(struct dentry *dentry, struct dentry *lower_dentry, /* check if regular file and whiteout were both found */ if (unlikely(lower_dentry->d_inode)) printk(KERN_WARNING "unionfs: removing whiteout; regular " - "file exists in directory %s (branch %d)\n", - lower_dir_dentry->d_name.name, bindex); + "file exists in directory %pd (branch %d)\n", + lower_dir_dentry, bindex); /* check if branch is writeable */ err = is_robranch_super(dentry->d_sb, bindex);