summaryrefslogtreecommitdiffstats
path: root/xlators/storage/bd_map/src/bd_map_help.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/storage/bd_map/src/bd_map_help.c')
-rw-r--r--xlators/storage/bd_map/src/bd_map_help.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/xlators/storage/bd_map/src/bd_map_help.c b/xlators/storage/bd_map/src/bd_map_help.c
index 3576d7056..0613aa383 100644
--- a/xlators/storage/bd_map/src/bd_map_help.c
+++ b/xlators/storage/bd_map/src/bd_map_help.c
@@ -352,6 +352,26 @@ out:
return pentry;
}
+int bd_entry_rm (const char *path)
+{
+ bd_entry_t *bdentry = NULL;
+ int ret = -1;
+
+ bdentry = bd_entry_get (path);
+ if (!bdentry)
+ goto out;
+
+ list_del_init (&bdentry->sibling);
+ list_del_init (&bdentry->child);
+ GF_FREE (bdentry);
+
+ ret = 0;
+out:
+ return ret;
+}
+
+
+
/* Called with priv->bd_lock held */
void bd_entry_put (bd_entry_t *entry)
{