btrfs: Streamline replace sem unlock in btrfs_dev_replace_start
authorNikolay Borisov <nborisov@suse.com>
Tue, 14 May 2019 10:54:42 +0000 (13:54 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 1 Jul 2019 11:34:54 +0000 (13:34 +0200)
commitfa19452a4039539a5846198b9aecb8be51ce61ca
treed29c33dc65b5d1507b8fe34e73b2963e33c45e2f
parente1e0eb43ce1fd7bbdd9590715623cb3799896434
btrfs: Streamline replace sem unlock in btrfs_dev_replace_start

There are only 2 branches which goto leave label with need_unlock set
to true. Essentially need_unlock is used as a substitute for directly
calling up_write. Since the branches needing this are only 2 and their
context is not that big it's more clear to just call up_write where
required. No functional changes.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
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/dev-replace.c