btrfs: simplify exit paths of btrfs_evict_inode()
authorFilipe Manana <fdmanana@suse.com>
Tue, 21 Mar 2023 11:14:00 +0000 (11:14 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Apr 2023 16:01:20 +0000 (18:01 +0200)
commitb7b1167c36350904899594ddb235f64d59625195
treea960df8bece858fb989f4f303b7fb7755d1edf61
parentf8f210dc84709804c9f952297f2bfafa6ea6b4bd
btrfs: simplify exit paths of btrfs_evict_inode()

Instead of using two labels at btrfs_evict_inode() for exiting depending
on whether we need to delete the inode items and orphan or some error
happened, we can use a single exit label if we initialize the block
reserve to NULL, since btrfs_free_block_rsv() ignores a NULL block reserve
pointer. So just do that. It will also make an upcoming change simpler by
avoiding one extra error label.

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