Merge tag 'xarray-5.18' of git://git.infradead.org/users/willy/xarray
[platform/kernel/linux-starfive.git] / include / linux / xarray.h
index 66e28bc..72feab5 100644 (file)
@@ -1318,6 +1318,7 @@ struct xa_state {
        struct xa_node *xa_node;
        struct xa_node *xa_alloc;
        xa_update_node_t xa_update;
+       struct list_lru *xa_lru;
 };
 
 /*
@@ -1337,7 +1338,8 @@ struct xa_state {
        .xa_pad = 0,                                    \
        .xa_node = XAS_RESTART,                         \
        .xa_alloc = NULL,                               \
-       .xa_update = NULL                               \
+       .xa_update = NULL,                              \
+       .xa_lru = NULL,                                 \
 }
 
 /**
@@ -1632,6 +1634,11 @@ static inline void xas_set_update(struct xa_state *xas, xa_update_node_t update)
        xas->xa_update = update;
 }
 
+static inline void xas_set_lru(struct xa_state *xas, struct list_lru *lru)
+{
+       xas->xa_lru = lru;
+}
+
 /**
  * xas_next_entry() - Advance iterator to next present entry.
  * @xas: XArray operation state.