mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 22:57:21 -04:00
btrfs: assert RAID stripe-extent length is always greater than 0
When modifying a RAID stripe-extent, ASSERT() that the length of the new RAID stripe-extent is always greater than 0. Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
committed by
David Sterba
parent
9257d8632a
commit
5a0e38eab7
@@ -28,6 +28,7 @@ static void btrfs_partially_delete_raid_extent(struct btrfs_trans_handle *trans,
|
||||
.offset = newlen,
|
||||
};
|
||||
|
||||
ASSERT(newlen > 0);
|
||||
ASSERT(oldkey->type == BTRFS_RAID_STRIPE_KEY);
|
||||
|
||||
leaf = path->nodes[0];
|
||||
|
||||
Reference in New Issue
Block a user