From 2489007e7d740ccbc3e0a202914e243ad5178787 Mon Sep 17 00:00:00 2001 From: codeworkx Date: Sat, 22 Sep 2012 09:48:20 +0200 Subject: merge opensource jb u5 Change-Id: I1aaec157aa196f3448eff8636134fce89a814cf2 --- fs/ext4/namei.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'fs/ext4/namei.c') diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 3d36d5a..5767c50 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -1031,17 +1031,25 @@ static struct dentry *ext4_lookup(struct inode *dir, struct dentry *dentry, stru inode = NULL; if (bh) { __u32 ino = le32_to_cpu(de->inode); - brelse(bh); if (!ext4_valid_inum(dir->i_sb, ino)) { + /* for debugging, sangwoo2.lee */ + printk(KERN_ERR "Name of directory entry has bad inode# : %s\n", de->name); + print_bh(dir->i_sb, bh, 0, EXT4_BLOCK_SIZE(dir->i_sb)); + /* for debugging */ + brelse(bh); + EXT4_ERROR_INODE(dir, "bad inode number: %u", ino); return ERR_PTR(-EIO); } + brelse(bh); + inode = ext4_iget(dir->i_sb, ino); if (IS_ERR(inode)) { if (PTR_ERR(inode) == -ESTALE) { + /* In case of -ESTALE, printing debugging data is already done in ext4_iget */ EXT4_ERROR_INODE(dir, - "deleted inode referenced: %u", - ino); + "deleted inode referenced: %u at parent inode : %lu", + ino, dir->i_ino); return ERR_PTR(-EIO); } else { return ERR_CAST(inode); -- cgit v1.1