From: Matthew Wilcox (Oracle) Date: Wed, 26 Feb 2020 19:00:43 +0000 (-0500) Subject: Renumber XA.*ENTRY constants X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=66df77fed29a1d6499dbf1d0efd2095d7642d189;p=users%2Fjedix%2Flinux-maple.git 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) --- diff --git a/include/linux/xarray.h b/include/linux/xarray.h index 77ae0b9cf200f..b2b76b3e427db 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.