From: Yangtao Li Date: Thu, 17 Apr 2025 14:26:49 +0000 (-0600) Subject: btrfs: remove BTRFS_REF_LAST from enum btrfs_ref_type X-Git-Tag: block-6.16-20250606~42^2~111 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=023beaeca6127ca6b85e1576f489185b6d95a66e;p=linux-block.git btrfs: remove BTRFS_REF_LAST from enum btrfs_ref_type Commit b28b1f0ce44c ("btrfs: delayed-ref: Introduce better documented delayed ref structures") introduced BTRFS_REF_LAST, which can be used for sanity checking, e.g. in switch/case or for loops. In btrfs_ref_type() there is an assertion ASSERT(ref->type == BTRFS_REF_DATA || ref->type == BTRFS_REF_METADATA); to validate the values so we don't need the ending enum. Signed-off-by: Yangtao Li Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/delayed-ref.h b/fs/btrfs/delayed-ref.h index f5ae880308d3..78cc23837610 100644 --- a/fs/btrfs/delayed-ref.h +++ b/fs/btrfs/delayed-ref.h @@ -262,7 +262,6 @@ enum btrfs_ref_type { BTRFS_REF_NOT_SET, BTRFS_REF_DATA, BTRFS_REF_METADATA, - BTRFS_REF_LAST, } __packed; struct btrfs_ref {