]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Renumber XA.*ENTRY constants
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 26 Feb 2020 19:00:43 +0000 (14:00 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Fri, 30 Oct 2020 19:01:18 +0000 (15:01 -0400)
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) <willy@infradead.org>
include/linux/xarray.h

index 77ae0b9cf200f8f15ffbfe30a43a86db5ad405ad..b2b76b3e427dbacd559a50b8090b3743c5eb3e68 100644 (file)
@@ -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.