mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
btrfs: remove unnecessary else branch in run_one_delayed_ref()
There is no need for an else branch to deal with an unexpected delayed ref type. We can just change the previous branch to deal with this by checking if the ref type is not BTRFS_EXTENT_OWNER_REF_KEY, since that branch is useless as it only sets 'ret' to zero when it's already zero. So merge the two branches. Reviewed-by: Boris Burkov <boris@bur.io> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
c7d1d4ff56
commit
271cbe7635
|
|
@ -1780,9 +1780,7 @@ static int run_one_delayed_ref(struct btrfs_trans_handle *trans,
|
|||
node->type == BTRFS_SHARED_DATA_REF_KEY) {
|
||||
ret = run_delayed_data_ref(trans, href, node, extent_op,
|
||||
insert_reserved);
|
||||
} else if (node->type == BTRFS_EXTENT_OWNER_REF_KEY) {
|
||||
ret = 0;
|
||||
} else {
|
||||
} else if (unlikely(node->type != BTRFS_EXTENT_OWNER_REF_KEY)) {
|
||||
ret = -EUCLEAN;
|
||||
btrfs_err(fs_info, "unexpected delayed ref node type: %u", node->type);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user