diff options
author | Matthew Wilcox <willy@infradead.org> | 2019-01-26 00:52:26 -0500 |
---|---|---|
committer | Matthew Wilcox <willy@infradead.org> | 2019-02-04 23:16:58 -0500 |
commit | 809ab9371ca0a96b44d9866ad82849410759a45b (patch) | |
tree | 57f70feee92687a74b7e39b88b88946f48e3e523 /lib/xarray.c | |
parent | bd54211b8e199ffb701ec98bf4f301e4a6f38a92 (diff) |
XArray: Update xa_erase family descriptions
xa_erase does not allocate memory and doesn't have a gfp parameter.
Update the descriptions of all four variants to be more useful.
Signed-off-by: Matthew Wilcox <willy@infradead.org>
Diffstat (limited to 'lib/xarray.c')
-rw-r--r-- | lib/xarray.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/xarray.c b/lib/xarray.c index 81c3171ddde9..fb783bf2a441 100644 --- a/lib/xarray.c +++ b/lib/xarray.c | |||
@@ -1294,13 +1294,12 @@ static void *xas_result(struct xa_state *xas, void *curr) | |||
1294 | * @xa: XArray. | 1294 | * @xa: XArray. |
1295 | * @index: Index into array. | 1295 | * @index: Index into array. |
1296 | * | 1296 | * |
1297 | * If the entry at this index is a multi-index entry then all indices will | 1297 | * After this function returns, loading from @index will return %NULL. |
1298 | * be erased, and the entry will no longer be a multi-index entry. | 1298 | * If the index is part of a multi-index entry, all indices will be erased |
1299 | * This function expects the xa_lock to be held on entry. | 1299 | * and none of the entries will be part of a multi-index entry. |
1300 | * | 1300 | * |
1301 | * Context: Any context. Expects xa_lock to be held on entry. May | 1301 | * Context: Any context. Expects xa_lock to be held on entry. |
1302 | * release and reacquire xa_lock if @gfp flags permit. | 1302 | * Return: The entry which used to be at this index. |
1303 | * Return: The old entry at this index. | ||
1304 | */ | 1303 | */ |
1305 | void *__xa_erase(struct xarray *xa, unsigned long index) | 1304 | void *__xa_erase(struct xarray *xa, unsigned long index) |
1306 | { | 1305 | { |
@@ -1314,9 +1313,9 @@ EXPORT_SYMBOL(__xa_erase); | |||
1314 | * @xa: XArray. | 1313 | * @xa: XArray. |
1315 | * @index: Index of entry. | 1314 | * @index: Index of entry. |
1316 | * | 1315 | * |
1317 | * This function is the equivalent of calling xa_store() with %NULL as | 1316 | * After this function returns, loading from @index will return %NULL. |
1318 | * the third argument. The XArray does not need to allocate memory, so | 1317 | * If the index is part of a multi-index entry, all indices will be erased |
1319 | * the user does not need to provide GFP flags. | 1318 | * and none of the entries will be part of a multi-index entry. |
1320 | * | 1319 | * |
1321 | * Context: Any context. Takes and releases the xa_lock. | 1320 | * Context: Any context. Takes and releases the xa_lock. |
1322 | * Return: The entry which used to be at this index. | 1321 | * Return: The entry which used to be at this index. |