summaryrefslogtreecommitdiff
path: root/include/linux/xarray.h
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@infradead.org>2017-12-04 08:11:48 +0300
committerMatthew Wilcox <willy@infradead.org>2018-10-21 17:45:59 +0300
commit2264f5132fe45571139727ebdeb78696b35d1506 (patch)
tree6982c4c48af09fc39c1faf5da5b39c5d4fc41ad0 /include/linux/xarray.h
parent4e99d4e9579d3b950bf4b38d0d64eb1b9be78761 (diff)
downloadlinux-2264f5132fe45571139727ebdeb78696b35d1506.tar.xz
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>
Diffstat (limited to 'include/linux/xarray.h')
-rw-r--r--include/linux/xarray.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/xarray.h b/include/linux/xarray.h
index 2664e718dbd3..deae17aa0ed7 100644
--- a/include/linux/xarray.h
+++ b/include/linux/xarray.h
@@ -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.