]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Fix lock release order
authorNikolay Borisov <nborisov@suse.com>
Wed, 11 Apr 2018 08:21:18 +0000 (11:21 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 28 May 2018 16:07:16 +0000 (18:07 +0200)
commit88c199673154a7e7ce0c877e4b9712a7b354d63b
tree3570d5fac36a496a83b9ad27bd73ea748ecaa344
parentb58c5a31720623017a618ef37a010ed05cc1a69a
btrfs: Fix lock release order

Locks should generally be released in the oppposite order they are
acquired. Generally lock acquisiton ordering is used to ensure
deadlocks don't happen. However, as becomes more complicated it's
best to also maintain proper unlock order so as to avoid possible dead
locks. This was found by code inspection and doesn't necessarily lead
to a deadlock scenario.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c