Commit 9e78d14a authored by David Howells's avatar David Howells Committed by Tyler Hicks

Use %pd in eCryptFS

Use the new %pd printk() specifier in eCryptFS to replace passing of dentry
name or dentry name and name length * 2 with just passing the dentry.
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
cc: ecryptfs@vger.kernel.org
Signed-off-by: default avatarTyler Hicks <tyhicks@canonical.com>
parent 319e2e3f
...@@ -230,8 +230,8 @@ static int ecryptfs_open(struct inode *inode, struct file *file) ...@@ -230,8 +230,8 @@ static int ecryptfs_open(struct inode *inode, struct file *file)
if (rc) { if (rc) {
printk(KERN_ERR "%s: Error attempting to initialize " printk(KERN_ERR "%s: Error attempting to initialize "
"the lower file for the dentry with name " "the lower file for the dentry with name "
"[%s]; rc = [%d]\n", __func__, "[%pd]; rc = [%d]\n", __func__,
ecryptfs_dentry->d_name.name, rc); ecryptfs_dentry, rc);
goto out_free; goto out_free;
} }
if ((ecryptfs_inode_to_private(inode)->lower_file->f_flags & O_ACCMODE) if ((ecryptfs_inode_to_private(inode)->lower_file->f_flags & O_ACCMODE)
......
...@@ -250,8 +250,8 @@ int ecryptfs_initialize_file(struct dentry *ecryptfs_dentry, ...@@ -250,8 +250,8 @@ int ecryptfs_initialize_file(struct dentry *ecryptfs_dentry,
if (rc) { if (rc) {
printk(KERN_ERR "%s: Error attempting to initialize " printk(KERN_ERR "%s: Error attempting to initialize "
"the lower file for the dentry with name " "the lower file for the dentry with name "
"[%s]; rc = [%d]\n", __func__, "[%pd]; rc = [%d]\n", __func__,
ecryptfs_dentry->d_name.name, rc); ecryptfs_dentry, rc);
goto out; goto out;
} }
rc = ecryptfs_write_metadata(ecryptfs_dentry, ecryptfs_inode); rc = ecryptfs_write_metadata(ecryptfs_dentry, ecryptfs_inode);
...@@ -313,8 +313,8 @@ static int ecryptfs_i_size_read(struct dentry *dentry, struct inode *inode) ...@@ -313,8 +313,8 @@ static int ecryptfs_i_size_read(struct dentry *dentry, struct inode *inode)
if (rc) { if (rc) {
printk(KERN_ERR "%s: Error attempting to initialize " printk(KERN_ERR "%s: Error attempting to initialize "
"the lower file for the dentry with name " "the lower file for the dentry with name "
"[%s]; rc = [%d]\n", __func__, "[%pd]; rc = [%d]\n", __func__,
dentry->d_name.name, rc); dentry, rc);
return rc; return rc;
} }
...@@ -418,8 +418,8 @@ static struct dentry *ecryptfs_lookup(struct inode *ecryptfs_dir_inode, ...@@ -418,8 +418,8 @@ static struct dentry *ecryptfs_lookup(struct inode *ecryptfs_dir_inode,
if (IS_ERR(lower_dentry)) { if (IS_ERR(lower_dentry)) {
rc = PTR_ERR(lower_dentry); rc = PTR_ERR(lower_dentry);
ecryptfs_printk(KERN_DEBUG, "%s: lookup_one_len() returned " ecryptfs_printk(KERN_DEBUG, "%s: lookup_one_len() returned "
"[%d] on lower_dentry = [%s]\n", __func__, rc, "[%d] on lower_dentry = [%pd]\n", __func__, rc,
ecryptfs_dentry->d_name.name); ecryptfs_dentry);
goto out; goto out;
} }
if (lower_dentry->d_inode) if (lower_dentry->d_inode)
......
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