]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
Use %pd in eCryptFS
authorDavid Howells <dhowells@redhat.com>
Tue, 10 Dec 2013 15:26:48 +0000 (15:26 +0000)
committerTyler Hicks <tyhicks@canonical.com>
Tue, 17 Dec 2013 19:04:19 +0000 (11:04 -0800)
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: David Howells <dhowells@redhat.com>
cc: ecryptfs@vger.kernel.org
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
fs/ecryptfs/file.c
fs/ecryptfs/inode.c

index b1eaa7a1f82cd0ce03ebb0bad15c2d8f5b6f6e9c..c705360e2b167b27ed8f45ab814f3aea4e6230b4 100644 (file)
@@ -230,8 +230,8 @@ static int ecryptfs_open(struct inode *inode, struct file *file)
        if (rc) {
                printk(KERN_ERR "%s: Error attempting to initialize "
                        "the lower file for the dentry with name "
-                       "[%s]; rc = [%d]\n", __func__,
-                       ecryptfs_dentry->d_name.name, rc);
+                       "[%pd]; rc = [%d]\n", __func__,
+                       ecryptfs_dentry, rc);
                goto out_free;
        }
        if ((ecryptfs_inode_to_private(inode)->lower_file->f_flags & O_ACCMODE)
index c36c4482447159c219a4d4f56506087229ebb276..87ad33e091e9f79fa68e71630bced978119a4a2b 100644 (file)
@@ -250,8 +250,8 @@ int ecryptfs_initialize_file(struct dentry *ecryptfs_dentry,
        if (rc) {
                printk(KERN_ERR "%s: Error attempting to initialize "
                        "the lower file for the dentry with name "
-                       "[%s]; rc = [%d]\n", __func__,
-                       ecryptfs_dentry->d_name.name, rc);
+                       "[%pd]; rc = [%d]\n", __func__,
+                       ecryptfs_dentry, rc);
                goto out;
        }
        rc = ecryptfs_write_metadata(ecryptfs_dentry, ecryptfs_inode);
@@ -313,8 +313,8 @@ static int ecryptfs_i_size_read(struct dentry *dentry, struct inode *inode)
        if (rc) {
                printk(KERN_ERR "%s: Error attempting to initialize "
                        "the lower file for the dentry with name "
-                       "[%s]; rc = [%d]\n", __func__,
-                       dentry->d_name.name, rc);
+                       "[%pd]; rc = [%d]\n", __func__,
+                       dentry, rc);
                return rc;
        }
 
@@ -418,8 +418,8 @@ static struct dentry *ecryptfs_lookup(struct inode *ecryptfs_dir_inode,
        if (IS_ERR(lower_dentry)) {
                rc = PTR_ERR(lower_dentry);
                ecryptfs_printk(KERN_DEBUG, "%s: lookup_one_len() returned "
-                               "[%d] on lower_dentry = [%s]\n", __func__, rc,
-                               ecryptfs_dentry->d_name.name);
+                               "[%d] on lower_dentry = [%pd]\n", __func__, rc,
+                               ecryptfs_dentry);
                goto out;
        }
        if (lower_dentry->d_inode)