• O
    btrfs: reserve correct number of items for inode creation · 3538d68d
    Omar Sandoval 提交于
    The various inode creation code paths do not account for the compression
    property, POSIX ACLs, or the parent inode item when starting a
    transaction. Fix it by refactoring all of these code paths to use a new
    function, btrfs_new_inode_prepare(), which computes the correct number
    of items. To do so, it needs to know whether POSIX ACLs will be created,
    so move the ACL creation into that function. To reduce the number of
    arguments that need to be passed around for inode creation, define
    struct btrfs_new_inode_args containing all of the relevant information.
    
    btrfs_new_inode_prepare() will also be a good place to set up the
    fscrypt context and encrypted filename in the future.
    Reviewed-by: NSweet Tea Dorminy <sweettea-kernel@dorminy.me>
    Signed-off-by: NOmar Sandoval <osandov@fb.com>
    Signed-off-by: NDavid Sterba <dsterba@suse.com>
    3538d68d
ctree.h 134.6 KB