btrfs: remove unnecessary logic when running new delayed references
authorFilipe Manana <fdmanana@suse.com>
Fri, 8 Sep 2023 17:20:21 +0000 (18:20 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 12 Oct 2023 14:44:05 +0000 (16:44 +0200)
commit3cbb9f516033602c8368c5ddbf3bae38715517c0
tree46521a1bed004805daccb6694e9bfa0997d240b4
parent03551d651e9d8ff5b310f9038581b2b030daeb87
btrfs: remove unnecessary logic when running new delayed references

When running delayed references, at btrfs_run_delayed_refs(), we have this
logic to run any new delayed references that might have been added just
after we ran all delayed references. This logic grabs the first delayed
reference, then locks it to wait for any contention on it before running
all new delayed references. This however is pointless and not necessary
because at __btrfs_run_delayed_refs() when we start running delayed
references, we pick the first reference with btrfs_obtain_ref_head() and
then we will lock it (with btrfs_delayed_ref_lock()).

So remove the duplicate and unnecessary logic at btrfs_run_delayed_refs().

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