summaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/btree.c
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-07-25 03:06:22 +0200
committerKent Overstreet <kmo@daterainc.com>2013-11-11 06:56:30 +0100
commit6054c6d4da1940c7bf8870c6393773aa794f53d8 (patch)
tree5851d01503e16884cc733284ae102d27d0fe71ca /drivers/md/bcache/btree.c
parentbcache: Kill op->replace (diff)
downloadlinux-6054c6d4da1940c7bf8870c6393773aa794f53d8.tar.xz
linux-6054c6d4da1940c7bf8870c6393773aa794f53d8.zip
bcache: Don't use op->insert_collision
When we convert bch_btree_insert() to bch_btree_map_leaf_nodes(), we won't be passing struct btree_op to bch_btree_insert() anymore - so we need a different way of returning whether there was a collision (really, a replace collision). Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Diffstat (limited to 'drivers/md/bcache/btree.c')
-rw-r--r--drivers/md/bcache/btree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c
index 7a1d8dc19e61..441524dd2d77 100644
--- a/drivers/md/bcache/btree.c
+++ b/drivers/md/bcache/btree.c
@@ -2227,6 +2227,9 @@ int bch_btree_insert(struct btree_op *op, struct cache_set *c,
}
}
+ if (op->insert_collision)
+ return -ESRCH;
+
return ret;
}