aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r--fs/btrfs/volumes.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index cd4d1315aaa9..8222f6f74147 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -4903,10 +4903,17 @@ static void sort_parity_stripes(struct btrfs_bio *bbio, int num_stripes)
4903static struct btrfs_bio *alloc_btrfs_bio(int total_stripes, int real_stripes) 4903static struct btrfs_bio *alloc_btrfs_bio(int total_stripes, int real_stripes)
4904{ 4904{
4905 struct btrfs_bio *bbio = kzalloc( 4905 struct btrfs_bio *bbio = kzalloc(
4906 /* the size of the btrfs_bio */
4906 sizeof(struct btrfs_bio) + 4907 sizeof(struct btrfs_bio) +
4908 /* plus the variable array for the stripes */
4907 sizeof(struct btrfs_bio_stripe) * (total_stripes) + 4909 sizeof(struct btrfs_bio_stripe) * (total_stripes) +
4910 /* plus the variable array for the tgt dev */
4908 sizeof(int) * (real_stripes) + 4911 sizeof(int) * (real_stripes) +
4909 sizeof(u64) * (real_stripes), 4912 /*
4913 * plus the raid_map, which includes both the tgt dev
4914 * and the stripes
4915 */
4916 sizeof(u64) * (total_stripes),
4910 GFP_NOFS); 4917 GFP_NOFS);
4911 if (!bbio) 4918 if (!bbio)
4912 return NULL; 4919 return NULL;