diff options
author | Matthew Wilcox <willy@infradead.org> | 2018-12-17 17:37:25 -0500 |
---|---|---|
committer | Matthew Wilcox <willy@infradead.org> | 2019-01-06 21:24:43 -0500 |
commit | 490fd30f859572ac97a51faa31860869744ba97b (patch) | |
tree | f950c9d1a195c64587d39b86af871d2fdef59bc2 /lib/test_xarray.c | |
parent | 3bd6e94bec122a951d462c239b47954cf5f36e33 (diff) |
XArray tests: Add RCU locking
0day picked up that I'd forgotten to add locking to this new test.
Signed-off-by: Matthew Wilcox <willy@infradead.org>
Diffstat (limited to 'lib/test_xarray.c')
-rw-r--r-- | lib/test_xarray.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/test_xarray.c b/lib/test_xarray.c index 4676c0a1eeca..a885afde0aef 100644 --- a/lib/test_xarray.c +++ b/lib/test_xarray.c | |||
@@ -839,6 +839,7 @@ static noinline void check_find_3(struct xarray *xa) | |||
839 | 839 | ||
840 | for (i = 0; i < 100; i++) { | 840 | for (i = 0; i < 100; i++) { |
841 | for (j = 0; j < 100; j++) { | 841 | for (j = 0; j < 100; j++) { |
842 | rcu_read_lock(); | ||
842 | for (k = 0; k < 100; k++) { | 843 | for (k = 0; k < 100; k++) { |
843 | xas_set(&xas, j); | 844 | xas_set(&xas, j); |
844 | xas_for_each_marked(&xas, entry, k, XA_MARK_0) | 845 | xas_for_each_marked(&xas, entry, k, XA_MARK_0) |
@@ -847,6 +848,7 @@ static noinline void check_find_3(struct xarray *xa) | |||
847 | XA_BUG_ON(xa, | 848 | XA_BUG_ON(xa, |
848 | xas.xa_node != XAS_RESTART); | 849 | xas.xa_node != XAS_RESTART); |
849 | } | 850 | } |
851 | rcu_read_unlock(); | ||
850 | } | 852 | } |
851 | xa_store_index(xa, i, GFP_KERNEL); | 853 | xa_store_index(xa, i, GFP_KERNEL); |
852 | xa_set_mark(xa, i, XA_MARK_0); | 854 | xa_set_mark(xa, i, XA_MARK_0); |