diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-04-01 13:40:44 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-04-01 13:40:44 -0700 |
commit | 5a3fe95d76999980a106f661bf70379818a77701 (patch) | |
tree | 65bb4a0514adfb5ca49043236c2dcfb0898f38aa /lib/xarray.c | |
parent | a3dfc532b8731843c12bdc45e804eacc47e51e50 (diff) | |
parent | 3ed4bb77156da0bc732847c8c9df92454c1fbeea (diff) |
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 'lib/xarray.c')
-rw-r--r-- | lib/xarray.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/xarray.c b/lib/xarray.c index b95e92598b9c..4acc88ea7c21 100644 --- a/lib/xarray.c +++ b/lib/xarray.c @@ -722,6 +722,8 @@ void xas_create_range(struct xa_state *xas) for (;;) { struct xa_node *node = xas->xa_node; + if (node->shift >= shift) + break; xas->xa_node = xa_parent_locked(xas->xa, node); xas->xa_offset = node->offset - 1; if (node->offset != 0) @@ -1079,6 +1081,7 @@ void xas_split(struct xa_state *xas, void *entry, unsigned int order) xa_mk_node(child)); if (xa_is_value(curr)) values--; + xas_update(xas, child); } else { unsigned int canon = offset - xas->xa_sibs; @@ -1093,6 +1096,7 @@ void xas_split(struct xa_state *xas, void *entry, unsigned int order) } while (offset-- > xas->xa_offset); node->nr_values += values; + xas_update(xas, node); } EXPORT_SYMBOL_GPL(xas_split); #endif |