summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2016-04-13 11:06:52 +1000
committerJames Morris <james.l.morris@oracle.com>2016-04-13 11:06:52 +1000
commit58976eef9dc0318ef87bb81a6303b69d941d04bc (patch)
treeda4ba5ee905e1da35d43e6226d8ea4b3c002adc2 /lib
parent1c74a7f812b135d3df41d7c3671b647aed6467bf (diff)
parent952cca6a724c420a1efb6025e41862dfd2c1edc3 (diff)
downloadlinux-58976eef9dc0318ef87bb81a6303b69d941d04bc.tar.gz
linux-58976eef9dc0318ef87bb81a6303b69d941d04bc.tar.bz2
linux-58976eef9dc0318ef87bb81a6303b69d941d04bc.zip
Merge tag 'keys-fixes-20160412' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into for-linus
Diffstat (limited to 'lib')
-rw-r--r--lib/assoc_array.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/assoc_array.c b/lib/assoc_array.c
index 03dd576e6773..59fd7c0b119c 100644
--- a/lib/assoc_array.c
+++ b/lib/assoc_array.c
@@ -524,7 +524,9 @@ static bool assoc_array_insert_into_terminal_node(struct assoc_array_edit *edit,
free_slot = i;
continue;
}
- if (ops->compare_object(assoc_array_ptr_to_leaf(ptr), index_key)) {
+ if (assoc_array_ptr_is_leaf(ptr) &&
+ ops->compare_object(assoc_array_ptr_to_leaf(ptr),
+ index_key)) {
pr_devel("replace in slot %d\n", i);
edit->leaf_p = &node->slots[i];
edit->dead_leaf = node->slots[i];