]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: use btrfs_try_lock_balance in btrfs_ioctl_balance
authorNikolay Borisov <nborisov@suse.com>
Thu, 5 May 2022 07:08:25 +0000 (10:08 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Jul 2022 15:44:34 +0000 (17:44 +0200)
commitcbdf7e8abc5b2b511ca2ac63523b883477de713d
tree40243e12db10357ff1b44e8b94b9c3269412533b
parent309faa74e33483d94dabd4b3741f8ea3adb98d18
btrfs: use btrfs_try_lock_balance in btrfs_ioctl_balance

This eliminates 2 labels and makes the code generally more streamlined.
Also rename the 'out_bargs' label to 'out_unlock' since bargs is going
to be freed under the 'out' label. This also fixes a memory leak since
bargs wasn't correctly freed in one of the condition which are now moved
in btrfs_try_lock_balance.

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/ioctl.c