diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 396dc3a5d16b..af3a6992bf20 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -5331,11 +5331,15 @@ struct inode *__ext4_iget(struct super_block *sb, unsigned long ino, if (EXT4_INODE_SIZE(inode->i_sb) > EXT4_GOOD_OLD_INODE_SIZE) { if (ei->i_extra_isize == 0) { + printk("DEBUG: inode %lu: i_extra_isize == 0, skipping xattr check\n", + inode->i_ino); /* The extra space is currently unused. Use it. */ BUILD_BUG_ON(sizeof(struct ext4_inode) & 3); ei->i_extra_isize = sizeof(struct ext4_inode) - EXT4_GOOD_OLD_INODE_SIZE; } else { + printk("DEBUG: inode %lu: calling ext4_iget_extra_inode\n", + inode->i_ino); 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 7bf9ba19a89d..abc27521a3a8 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -316,6 +316,9 @@ int __xattr_check_inode(struct inode *inode, struct ext4_xattr_ibody_header *header, void *end, const char *function, unsigned int line) { + printk("DEBUG: inode %lu: __xattr_check_inode called, IFIRST=%px end=%px gap=%ld\n", + inode->i_ino, IFIRST(header), end, + (long)(end - (void *)IFIRST(header))); return check_xattrs(inode, NULL, IFIRST(header), end, IFIRST(header), function, line); } @@ -645,6 +648,8 @@ ext4_xattr_ibody_get(struct inode *inode, int name_index, const char *name, if (!ext4_test_inode_state(inode, EXT4_STATE_XATTR)) return -ENODATA; + printk("DEBUG: inode %lu: ext4_xattr_ibody_get called, EXT4_STATE_XATTR is set\n", + inode->i_ino); error = ext4_get_inode_loc(inode, &iloc); if (error) return error; @@ -652,6 +657,9 @@ ext4_xattr_ibody_get(struct inode *inode, int name_index, const char *name, header = IHDR(inode, raw_inode); end = ITAIL(inode, raw_inode); entry = IFIRST(header); + printk("DEBUG: inode %lu: ibody_get IFIRST=%px end=%px gap=%ld\n", + inode->i_ino, entry, end, + (long)(end - (void *)entry)); error = xattr_find_entry(inode, &entry, end, name_index, name, 0); if (error) goto cleanup;