diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 5b7a15db4953..257e9b1c6416 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -5099,7 +5099,8 @@ static inline int ext4_iget_extra_inode(struct inode *inode, if (EXT4_INODE_HAS_XATTR_SPACE(inode) && *magic == cpu_to_le32(EXT4_XATTR_MAGIC)) { int err; - + ext4_error_inode(inode, "ext4_iget_extra_inode", 5102, 0, + "wow this inode has extra space"); err = xattr_check_inode(inode, IHDR(inode, raw_inode), ITAIL(inode, raw_inode)); if (err) @@ -5112,6 +5113,7 @@ static inline int ext4_iget_extra_inode(struct inode *inode, return err; } else EXT4_I(inode)->i_inline_off = 0; + return 0; } @@ -5414,6 +5416,13 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino, ei->i_sync_tid = tid; ei->i_datasync_tid = tid; } + if (EXT4_INODE_SIZE(inode->i_sb) < EXT4_GOOD_OLD_INODE_SIZE) { + ext4_error_inode(inode, function, line, 0, + "wow! this inode has less data"); + if (ext4_test_inode_flag(inode, EXT4_INODE_INLINE_DATA)) { + ext4_error_inode(inode, function, line, 0, "wow! this inode is line"); + } + } if (EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE) { if (ei->i_extra_isize == 0) { @@ -5422,6 +5431,8 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino, ei->i_extra_isize = sizeof(struct ext4_inode) - EXT4_GOOD_OLD_INODE_SIZE; } else { + ext4_error_inode(inode, function, line, 0, + "wow! this inode has reached ext4 iget"); ret = ext4_iget_extra_inode(inode, raw_inode, ei); if (ret) goto bad_inode; diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 5a6fe1513fd2..9b4a6978b313 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -195,7 +195,7 @@ check_xattrs(struct inode *inode, struct buffer_head *bh, struct ext4_xattr_entry *e = entry; int err = -EFSCORRUPTED; char *err_str; - + ext4_error_inode(inode, "check_xattrs", 198, 0, "wow! we are in check_xattrs"); if (bh) { if (BHDR(bh)->h_magic != cpu_to_le32(EXT4_XATTR_MAGIC) || BHDR(bh)->h_blocks != cpu_to_le32(1)) {