ext4: add the basic function for inline data support
[deliverable/linux.git] / fs / ext4 / inode.c
index befa005711a112d11430b86765f193c6fcc6ea2e..e23f114e2cfe3d10eee6543c63ce702798434b1d 100644 (file)
@@ -3706,8 +3706,10 @@ static inline void ext4_iget_extra_inode(struct inode *inode,
 {
        __le32 *magic = (void *)raw_inode +
                        EXT4_GOOD_OLD_INODE_SIZE + ei->i_extra_isize;
-       if (*magic == cpu_to_le32(EXT4_XATTR_MAGIC))
+       if (*magic == cpu_to_le32(EXT4_XATTR_MAGIC)) {
                ext4_set_inode_state(inode, EXT4_STATE_XATTR);
+               ext4_find_inline_data_nolock(inode);
+       }
 }
 
 struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
@@ -3780,6 +3782,7 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
        set_nlink(inode, le16_to_cpu(raw_inode->i_links_count));
 
        ext4_clear_state_flags(ei);     /* Only relevant on 32-bit archs */
+       ei->i_inline_off = 0;
        ei->i_dir_start_lookup = 0;
        ei->i_dtime = le32_to_cpu(raw_inode->i_dtime);
        /* We now have enough fields to check if the inode was active or not.
This page took 0.024768 seconds and 5 git commands to generate.