Commit e1b0fa74 authored by Charlie Jacobsen's avatar Charlie Jacobsen Committed by Vikram Narayanan

Fixes two locking bugs in 'data store'.

I left out the node unlock during insert and delete. This didn't
matter inside an LCD because locks are elided. But it does in
kliblcd.

Fixed in liblcd and kliblcd.
parent ce03d0a2
......@@ -703,6 +703,10 @@ int lcd_dstore_insert(struct dstore *dstore, void *object, int tag,
*/
dstore_node->ddt_root = get_ddt_root();
dstore_node->ddt_root->root_node = dstore_node;
/*
* Release node
*/
lcd_dstore_put(dstore_node);
*out = d;
......@@ -908,6 +912,10 @@ void lcd_dstore_delete(struct dstore *dstore, dptr_t d)
* Delete the dstore node
*/
done = try_delete_dstore_node(dstore, dstore_node);
/*
* Release node
*/
lcd_dstore_put(dstore_node);
if (!done) {
/*
......
......@@ -691,6 +691,10 @@ int lcd_dstore_insert(struct dstore *dstore, void *object, int tag,
*/
dstore_node->ddt_root = get_ddt_root();
dstore_node->ddt_root->root_node = dstore_node;
/*
* Release node
*/
lcd_dstore_put(dstore_node);
*out = d;
......@@ -896,6 +900,10 @@ void lcd_dstore_delete(struct dstore *dstore, dptr_t d)
* Delete the dstore node
*/
done = try_delete_dstore_node(dstore, dstore_node);
/*
* Release node
*/
lcd_dstore_put(dstore_node);
if (!done) {
/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment