btrfs: remove unused variable length in btrfs_insert_one_raid_extent()
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Thu, 12 Dec 2024 12:56:06 +0000 (13:56 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 13 Jan 2025 13:53:16 +0000 (14:53 +0100)
Remove the variable length in btrfs_insert_one_raid_extent() as it is
unused.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/raid-stripe-tree.c

index 9ffc79f250fbb230bbecd0045c998e062b53ac92..45b823a0913aea5fdaab91a80e79d253a66bb700 100644 (file)
@@ -199,12 +199,8 @@ int btrfs_insert_one_raid_extent(struct btrfs_trans_handle *trans,
        for (int i = 0; i < num_stripes; i++) {
                u64 devid = bioc->stripes[i].dev->devid;
                u64 physical = bioc->stripes[i].physical;
-               u64 length = bioc->stripes[i].length;
                struct btrfs_raid_stride *raid_stride = &stripe_extent->strides[i];
 
-               if (length == 0)
-                       length = bioc->size;
-
                btrfs_set_stack_raid_stride_devid(raid_stride, devid);
                btrfs_set_stack_raid_stride_physical(raid_stride, physical);
        }