• Andreas Gruenbacher's avatar
    [PATCH] ext3/ea: ix i_extra_isize check · 8183c4b2
    Andreas Gruenbacher authored
    We are checking for (EXT3_SB(inode->i_sb)->s_inode_size <=
    EXT3_GOOD_OLD_INODE_SIZE) to find out if we can set in-inode attributes;
    the test fails for inodes that have been created before the ea-in-inode
    patch.  Those inodes have (i_extra_isize == 0), so we end up with the
    attributes overlapping the i_extra_isize field.  Checking for
    (i_extra_isize == 0) instead fixes this case.
    
    The EXT3_STATE_XATTR flag is only set if (i_extra_isize > 0) and the inodes
    has in-inode attributes, so that is enough in the first two tests.
    Signed-off-by: default avatarAndreas Gruenbacher <agruen@suse.de>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    8183c4b2
xattr.c 34 KB