• Jan Kara's avatar
    ext4: avoid BUG_ON when creating xattrs · b40ebaf6
    Jan Kara authored
    Commit fb0a387d ("ext4: limit block allocations for indirect-block
    files to < 2^32") added code to try to allocate xattr block with 32-bit
    block number for indirect block based files on the grounds that these
    files cannot use larger block numbers. It also added BUG_ON when
    allocated block could not fit into 32 bits. This is however bogus
    reasoning because xattr block is stored in inode->i_file_acl and
    inode->i_file_acl_hi and as such even indirect block based files can
    happily use full 48 bits for xattr block number. The proper handling
    seems to be there basically since 64-bit block number support was added.
    So remove the bogus limitation and BUG_ON.
    
    Cc: Eric Sandeen <sandeen@redhat.com>
    Fixes: fb0a387d ("ext4: limit block allocations for indirect-block files to < 2^32")
    Signed-off-by: default avatarJan Kara <jack@suse.cz>
    Link: https://lore.kernel.org/r/20221121130929.32031-1-jack@suse.czSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
    Cc: stable@kernel.org
    b40ebaf6
xattr.c 81.6 KB