]> 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)
commitc007e8d859251ac7b2afef6da7c00aa00b441a24
tree3570d5fac36a496a83b9ad27bd73ea748ecaa344
parent0b1b065fc9298faaf24f4c91ea2410dbf22bae3d
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