mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
xarray: Add xas_create_range
This hopefully temporary function is useful for users who have not yet been converted to multi-index entries. Signed-off-by: Matthew Wilcox <willy@infradead.org>
This commit is contained in:
parent
4e99d4e957
commit
2264f5132f
3 changed files with 182 additions and 0 deletions
|
@ -822,6 +822,17 @@ static inline bool xas_valid(const struct xa_state *xas)
|
|||
return !xas_invalid(xas);
|
||||
}
|
||||
|
||||
/**
|
||||
* xas_is_node() - Does the xas point to a node?
|
||||
* @xas: XArray operation state.
|
||||
*
|
||||
* Return: %true if the xas currently references a node.
|
||||
*/
|
||||
static inline bool xas_is_node(const struct xa_state *xas)
|
||||
{
|
||||
return xas_valid(xas) && xas->xa_node;
|
||||
}
|
||||
|
||||
/* True if the pointer is something other than a node */
|
||||
static inline bool xas_not_node(struct xa_node *node)
|
||||
{
|
||||
|
@ -889,6 +900,8 @@ void xas_init_marks(const struct xa_state *);
|
|||
bool xas_nomem(struct xa_state *, gfp_t);
|
||||
void xas_pause(struct xa_state *);
|
||||
|
||||
void xas_create_range(struct xa_state *);
|
||||
|
||||
/**
|
||||
* xas_reload() - Refetch an entry from the xarray.
|
||||
* @xas: XArray operation state.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue