Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH] btrfs: removed unused variable length in btrfs_insert_one_raid_extent
@ 2024-12-12 12:56 Johannes Thumshirn
  2024-12-13 12:12 ` Filipe Manana
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Thumshirn @ 2024-12-12 12:56 UTC (permalink / raw)
  To: David Sterba, Josef Bacik; +Cc: Naohiro Aota, linux-btrfs, Johannes Thumshirn

From: Johannes Thumshirn <johannes.thumshirn@wdc.com>

Remove the variable length in btrfs_insert_one_raid_extent() as it is
unused.

Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 fs/btrfs/raid-stripe-tree.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/fs/btrfs/raid-stripe-tree.c b/fs/btrfs/raid-stripe-tree.c
index 9ffc79f250fb..45b823a0913a 100644
--- a/fs/btrfs/raid-stripe-tree.c
+++ b/fs/btrfs/raid-stripe-tree.c
@@ -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);
 	}
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-13 12:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-12 12:56 [PATCH] btrfs: removed unused variable length in btrfs_insert_one_raid_extent Johannes Thumshirn
2024-12-13 12:12 ` Filipe Manana

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox