[PATCH 05/23] xarray: Use xas_erase() in __xa_erase()

From: Jan Kara
Date: Wed Apr 22 2020 - 11:06:03 EST


In this case we want to erase element from the array. Use xas_erase()
for it.

Signed-off-by: Jan Kara <jack@xxxxxxx>
---
lib/xarray.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/xarray.c b/lib/xarray.c
index 49fafcee1c8e..96be029412b2 100644
--- a/lib/xarray.c
+++ b/lib/xarray.c
@@ -1358,7 +1358,7 @@ EXPORT_SYMBOL(xas_erase);
void *__xa_erase(struct xarray *xa, unsigned long index)
{
XA_STATE(xas, xa, index);
- return xas_result(&xas, xas_store(&xas, NULL));
+ return xas_result(&xas, xas_erase(&xas));
}
EXPORT_SYMBOL(__xa_erase);

--
2.16.4