• Josef Bacik's avatar
    btrfs: move btrfs_kill_delayed_inode_items into evict · 2adc75d6
    Josef Bacik authored
    We have a special case in btrfs_truncate_inode_items() to call
    btrfs_kill_delayed_inode_items() if min_type == 0, which is only called
    during evict.
    
    Instead move this out into evict proper, and add some comments because I
    erroneously attempted to remove this code altogether without
    understanding what we were doing.
    
    Evict is updating the inode only because we only care about making sure
    the i_nlink count has hit disk.  If we had pending deletions we don't
    want to process those via the delayed inode updates, we simply want to
    drop all of them and reclaim the reserved metadata space.  Then from
    there the btrfs_truncate_inode_items() will do the work to remove all of
    the items as appropriate.
    Reviewed-by: default avatarFilipe Manana <fdmanana@suse.com>
    Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    2adc75d6
inode.c 300 KB