From b56f61863c69544c4580a92095c88d58bb3def05 Mon Sep 17 00:00:00 2001 From: "Matthew Wilcox (Oracle)" Date: Wed, 26 Feb 2020 14:00:43 -0500 Subject: [PATCH] Renumber XA.*ENTRY constants Entries below 256 are reserved for siblings, so renumber the RETRY entry back to 256. Entries which are ZERO and higher are allowed to be inserted into the XArray, so renumber ZERO to 259, and slot SKIP and DELETED in at 257 and 258. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/xarray.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/xarray.h b/include/linux/xarray.h index 77ae0b9cf200..b2b76b3e427d 100644 --- a/include/linux/xarray.h +++ b/include/linux/xarray.h @@ -169,7 +169,7 @@ static inline bool xa_is_internal(const void *entry) return ((unsigned long)entry & 3) == 2; } -#define XA_ZERO_ENTRY xa_mk_internal(258) +#define XA_ZERO_ENTRY xa_mk_internal(259) /** * xa_is_zero() - Is the entry a zero entry? @@ -1248,7 +1248,7 @@ static inline bool xa_is_sibling(const void *entry) (entry < xa_mk_sibling(XA_CHUNK_SIZE - 1)); } -#define XA_RETRY_ENTRY xa_mk_internal(255) +#define XA_RETRY_ENTRY xa_mk_internal(256) /** * xa_is_retry() - Is the entry a retry entry? @@ -1261,7 +1261,8 @@ static inline bool xa_is_retry(const void *entry) return unlikely(entry == XA_RETRY_ENTRY); } -#define XA_SKIP_ENTRY xa_mk_internal(256) +#define XA_SKIP_ENTRY xa_mk_internal(257) + /** * xa_is_skip() - Is the entry a skip entry? * @entry: Entry retrieved from the XArray @@ -1273,7 +1274,8 @@ static inline bool xa_is_skip(const void *entry) return unlikely(entry == XA_SKIP_ENTRY); } -#define XA_DELETED_ENTRY xa_mk_internal(257) +#define XA_DELETED_ENTRY xa_mk_internal(258) + /** * xa_is_deleted() - has the entry been deleted? * @entry: Entry retrieved from the XArray @@ -1285,8 +1287,6 @@ static inline bool xa_is_deleted(const void *entry) return unlikely(entry == XA_DELETED_ENTRY); } - - /** * xa_is_advanced() - Is the entry only permitted for the advanced API? * @entry: Entry to be stored in the XArray. -- 2.50.1