Patchwork [6/9] Use %pd in Ext4

login
register
mail settings
Submitter David Howells
Date Dec. 10, 2013, 3:26 p.m.
Message ID <20131210152655.4916.77232.stgit@warthog.procyon.org.uk>
Download mbox | patch
Permalink /patch/299473/
State Awaiting Upstream
Headers show

Comments

David Howells - Dec. 10, 2013, 3:26 p.m.
Use the new %pd printk() specifier in Ext4 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: "Theodore Ts'o" <tytso@mit.edu>
cc: Andreas Dilger <adilger.kernel@dilger.ca>
cc: linux-ext4@vger.kernel.org
---

 fs/ext4/namei.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Theodore Ts'o - Dec. 10, 2013, 3:58 p.m.
On Tue, Dec 10, 2013 at 03:26:55PM +0000, David Howells wrote:
> Use the new %pd printk() specifier in Ext4 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: "Theodore Ts'o" <tytso@mit.edu>
> cc: Andreas Dilger <adilger.kernel@dilger.ca>
> cc: linux-ext4@vger.kernel.org

Acked-by: "Theodore Ts'o" <tytso@mit.edu>

Do you want to have Al take this, or I'm happy to carry this in the
ext4 tree.

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Howells - Dec. 11, 2013, 12:10 p.m.
Theodore Ts'o <tytso@mit.edu> wrote:

> Do you want to have Al take this, or I'm happy to carry this in the
> ext4 tree.

Can you take the Ext4 bit through your tree?

David
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Theodore Ts'o - Jan. 6, 2014, 2:43 p.m.
On Wed, Dec 11, 2013 at 12:10:04PM +0000, David Howells wrote:
> Theodore Ts'o <tytso@mit.edu> wrote:
> 
> > Do you want to have Al take this, or I'm happy to carry this in the
> > ext4 tree.
> 
> Can you take the Ext4 bit through your tree?

Thanks, applied to the ext4 tree.

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 5a0408d7b114..3e9e70663233 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1425,9 +1425,8 @@  static struct dentry *ext4_lookup(struct inode *dir, struct dentry *dentry, unsi
 			return ERR_PTR(-EIO);
 		}
 		if (unlikely(ino == dir->i_ino)) {
-			EXT4_ERROR_INODE(dir, "'%.*s' linked to parent dir",
-					 dentry->d_name.len,
-					 dentry->d_name.name);
+			EXT4_ERROR_INODE(dir, "'%pd' linked to parent dir",
+					 dentry);
 			return ERR_PTR(-EIO);
 		}
 		inode = ext4_iget(dir->i_sb, ino);