btrfs: make btrfs_release_delayed_iref handle the !iref case
authorJosef Bacik <josef@toxicpanda.com>
Fri, 21 May 2021 20:44:07 +0000 (16:44 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jun 2021 13:19:05 +0000 (15:19 +0200)
commita4cb90dc015cf18aa31bf7b8c38bf6426d9aed6a
treef206343b37a0c6c2ef5c3ef5e44bf819161bcd9a
parenteb3b50536642b6e1ba67e84dcacdd9ccef30d850
btrfs: make btrfs_release_delayed_iref handle the !iref case

Right now we only cleanup the delayed iref if we have
BTRFS_DELAYED_NODE_DEL_IREF set on the node.  However we have some error
conditions that need to cleanup the iref if it still exists, so to make
this code cleaner move the test_bit into btrfs_release_delayed_iref
itself and unconditionally call it in each of the cases instead.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/delayed-inode.c