As the comment mentioned, we reserved several ranges of internal node for tree maintenance, 0-62, 256, 257. This means a node bigger than XA_ZERO_ENTRY is a normal node. The checked on XA_ZERO_ENTRY seems to be more meaningful. Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxx> --- include/linux/xarray.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/xarray.h b/include/linux/xarray.h index a491653d8882..e9d07483af64 100644 --- a/include/linux/xarray.h +++ b/include/linux/xarray.h @@ -1221,7 +1221,7 @@ static inline struct xa_node *xa_to_node(const void *entry) /* Private */ static inline bool xa_is_node(const void *entry) { - return xa_is_internal(entry) && (unsigned long)entry > 4096; + return xa_is_internal(entry) && entry > XA_ZERO_ENTRY; } /* Private */ -- 2.23.0