aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/btrfs/volumes.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index c7843349c795..305b6a63ab1f 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -3734,12 +3734,16 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
3734 if (max_avail < BTRFS_STRIPE_LEN * dev_stripes) 3734 if (max_avail < BTRFS_STRIPE_LEN * dev_stripes)
3735 continue; 3735 continue;
3736 3736
3737 if (ndevs == fs_devices->rw_devices) {
3738 WARN(1, "%s: found more than %llu devices\n",
3739 __func__, fs_devices->rw_devices);
3740 break;
3741 }
3737 devices_info[ndevs].dev_offset = dev_offset; 3742 devices_info[ndevs].dev_offset = dev_offset;
3738 devices_info[ndevs].max_avail = max_avail; 3743 devices_info[ndevs].max_avail = max_avail;
3739 devices_info[ndevs].total_avail = total_avail; 3744 devices_info[ndevs].total_avail = total_avail;
3740 devices_info[ndevs].dev = device; 3745 devices_info[ndevs].dev = device;
3741 ++ndevs; 3746 ++ndevs;
3742 WARN_ON(ndevs > fs_devices->rw_devices);
3743 } 3747 }
3744 3748
3745 /* 3749 /*