summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/xlator.c
diff options
context:
space:
mode:
authorAnand V. Avati <avati@amp.gluster.com>2009-05-22 02:10:31 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-05-22 01:23:48 -0700
commit6d5aff7bfd2403aa132d41c659c76abaf58f0503 (patch)
tree8ce3372e288ef34c4e31f347064e3222f2c6b032 /libglusterfs/src/xlator.c
parentbbce052d47e5f17a476379f5de6925ae795465bb (diff)
THIS: add xlator_init() API to set @THIS
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'libglusterfs/src/xlator.c')
-rw-r--r--libglusterfs/src/xlator.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index 61f8f6f4eab..0f76d9c7fe7 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -824,6 +824,23 @@ xlator_notify (xlator_t *xl, int event, void *data, ...)
}
+int
+xlator_init (xlator_t *xl)
+{
+ xlator_t *old_THIS = NULL;
+ int ret = 0;
+
+ old_THIS = THIS;
+ THIS = xl;
+
+ ret = xl->init (xl);
+
+ THIS = old_THIS;
+
+ return ret;
+}
+
+
void
xlator_tree_fini (xlator_t *xl)
{