]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: simplify the send_in_progress check in btrfs_delete_subvolume
authorLu Fengqi <lufq.fnst@cn.fujitsu.com>
Sat, 4 Aug 2018 13:10:53 +0000 (21:10 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 15 Oct 2018 15:23:25 +0000 (17:23 +0200)
commit5d25631b23ecbbf2f8da7739412a6e88cdf7d666
tree100d0f82bee3330445b55726e9a67515a24f7db4
parentbc250ffde74621c5e46da39a74191bea8c93f097
btrfs: simplify the send_in_progress check in btrfs_delete_subvolume

Only when send_in_progress, we have to do something different such as
btrfs_warn() and return -EPERM. Therefore, we could check
send_in_progress first and process error handling, after the
root_item_lock has been got.

Just for better readability. No functional change.

Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c