diff options
author | 2022-04-01 13:40:44 -0700 | |
---|---|---|
committer | 2022-04-01 13:40:44 -0700 | |
commit | 5a3fe95d76999980a106f661bf70379818a77701 (patch) | |
tree | 65bb4a0514adfb5ca49043236c2dcfb0898f38aa /Documentation/core-api | |
parent | Merge tag 'riscv-for-linus-5.18-mw1' of git://git.kernel.org/pub/scm/linux/ke... (diff) | |
parent | XArray: Update the LRU list in xas_split() (diff) | |
download | linux-5a3fe95d76999980a106f661bf70379818a77701.tar.gz linux-5a3fe95d76999980a106f661bf70379818a77701.tar.bz2 linux-5a3fe95d76999980a106f661bf70379818a77701.zip |
Merge tag 'xarray-5.18' of git://git.infradead.org/users/willy/xarray
Pull XArray updates from Matthew Wilcox:
- Documentation update
- Fix test-suite build after move of bitmap.h
- Fix xas_create_range() when a large entry is already present
- Fix xas_split() of a shadow entry
* tag 'xarray-5.18' of git://git.infradead.org/users/willy/xarray:
XArray: Update the LRU list in xas_split()
XArray: Fix xas_create_range() when multi-order entry present
XArray: Include bitmap.h from xarray.h
XArray: Document the locking requirement for the xa_state
Diffstat (limited to 'Documentation/core-api')
-rw-r--r-- | Documentation/core-api/xarray.rst | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Documentation/core-api/xarray.rst b/Documentation/core-api/xarray.rst index a137a0e6d068..77e0ece2b1d6 100644 --- a/Documentation/core-api/xarray.rst +++ b/Documentation/core-api/xarray.rst @@ -315,11 +315,15 @@ indeed the normal API is implemented in terms of the advanced API. The advanced API is only available to modules with a GPL-compatible license. The advanced API is based around the xa_state. This is an opaque data -structure which you declare on the stack using the XA_STATE() -macro. This macro initialises the xa_state ready to start walking -around the XArray. It is used as a cursor to maintain the position -in the XArray and let you compose various operations together without -having to restart from the top every time. +structure which you declare on the stack using the XA_STATE() macro. +This macro initialises the xa_state ready to start walking around the +XArray. It is used as a cursor to maintain the position in the XArray +and let you compose various operations together without having to restart +from the top every time. The contents of the xa_state are protected by +the rcu_read_lock() or the xas_lock(). If you need to drop whichever of +those locks is protecting your state and tree, you must call xas_pause() +so that future calls do not rely on the parts of the state which were +left unprotected. The xa_state is also used to store errors. You can call xas_error() to retrieve the error. All operations check whether |