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);
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))
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;
}
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;
}
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,
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;
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;
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,
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;
}
}
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;
/* 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);