Skip to content

Commit dd61850

Browse files
committed
btrfs: warn for num_devices below 0
In preparation to de-duplicate a section of code where we deduce the num_devices, use warn instead of bug. Signed-off-by: Anand Jain <[email protected]>
1 parent 17c285a commit dd61850

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/volumes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3728,7 +3728,7 @@ int btrfs_balance(struct btrfs_fs_info *fs_info,
37283728
num_devices = fs_info->fs_devices->num_devices;
37293729
btrfs_dev_replace_read_lock(&fs_info->dev_replace);
37303730
if (btrfs_dev_replace_is_ongoing(&fs_info->dev_replace)) {
3731-
BUG_ON(num_devices < 1);
3731+
WARN_ON(num_devices < 1);
37323732
num_devices--;
37333733
}
37343734
btrfs_dev_replace_read_unlock(&fs_info->dev_replace);

0 commit comments

Comments
 (0)