aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/assoc_array.c4
-rw-r--r--lib/lockref.c9
2 files changed, 3 insertions, 10 deletions
diff --git a/lib/assoc_array.c b/lib/assoc_array.c
index 17edeaf19180..1b6a44f1ec3e 100644
--- a/lib/assoc_array.c
+++ b/lib/assoc_array.c
@@ -759,8 +759,8 @@ all_leaves_cluster_together:
759 pr_devel("all leaves cluster together\n"); 759 pr_devel("all leaves cluster together\n");
760 diff = INT_MAX; 760 diff = INT_MAX;
761 for (i = 0; i < ASSOC_ARRAY_FAN_OUT; i++) { 761 for (i = 0; i < ASSOC_ARRAY_FAN_OUT; i++) {
762 int x = ops->diff_objects(assoc_array_ptr_to_leaf(edit->leaf), 762 int x = ops->diff_objects(assoc_array_ptr_to_leaf(node->slots[i]),
763 assoc_array_ptr_to_leaf(node->slots[i])); 763 index_key);
764 if (x < diff) { 764 if (x < diff) {
765 BUG_ON(x < 0); 765 BUG_ON(x < 0);
766 diff = x; 766 diff = x;
diff --git a/lib/lockref.c b/lib/lockref.c
index d2b123f8456b..f07a40d33871 100644
--- a/lib/lockref.c
+++ b/lib/lockref.c
@@ -1,5 +1,6 @@
1#include <linux/export.h> 1#include <linux/export.h>
2#include <linux/lockref.h> 2#include <linux/lockref.h>
3#include <linux/mutex.h>
3 4
4#if USE_CMPXCHG_LOCKREF 5#if USE_CMPXCHG_LOCKREF
5 6
@@ -12,14 +13,6 @@
12#endif 13#endif
13 14
14/* 15/*
15 * Allow architectures to override the default cpu_relax() within CMPXCHG_LOOP.
16 * This is useful for architectures with an expensive cpu_relax().
17 */
18#ifndef arch_mutex_cpu_relax
19# define arch_mutex_cpu_relax() cpu_relax()
20#endif
21
22/*
23 * Note that the "cmpxchg()" reloads the "old" value for the 16 * Note that the "cmpxchg()" reloads the "old" value for the
24 * failure case. 17 * failure case.
25 */ 18 */