]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: handle priority ticket failures in their respective helpers
authorJosef Bacik <josef@toxicpanda.com>
Tue, 9 Nov 2021 15:12:01 +0000 (10:12 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 3 Jan 2022 14:09:45 +0000 (15:09 +0100)
commit06b3d7706d8871bf2862d4e75465ff0c920c6ad3
treef7d6f6edb46e07ea24766bc1fee941445b066515
parent2c76fa9ce3a75289e3cbd275a6652c8a7521a01a
btrfs: handle priority ticket failures in their respective helpers

Currently the error case for the priority tickets is handled where we
deal with all of the tickets, priority and non-priority.  This is OK in
general, but it makes for some awkward locking.  We take and drop the
space_info->lock back to back because of these different types of
tickets.

Rework the code to handle priority ticket failures in their respective
helpers.  This allows us to be less wonky with our space_info->lock
usage, and means that the main handler simply has to check
ticket->error, as the ticket is guaranteed to be off any list and
completely handled by the time it exits one of the handlers.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
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/space-info.c