]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: add assertions where number of devices could go below 0
authorAnand Jain <anand.jain@oracle.com>
Fri, 10 Aug 2018 05:53:20 +0000 (13:53 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 15 Oct 2018 15:23:26 +0000 (17:23 +0200)
commitdede00d13cb6d8872e4128475a2ad5ba303efc18
tree3f207d27fd9146fd1cc49408c35c4f7c1e889d27
parent1425ceb12910d98c950a748d960986926dbd5319
btrfs: add assertions where number of devices could go below 0

In preparation to add helper function to deduce the num_devices with
replace running, use assert instead of BUG_ON or WARN_ON. The number of
devices would not normally drop to 0 due to other checks so the assert
is sufficient.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ update changelog, adjust the assert condition ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c