From 473d02d1698259b4a0a6c22fdf70071e69c6e987 Mon Sep 17 00:00:00 2001 From: Basavanagowda Kanur Date: Fri, 13 Mar 2009 01:12:20 +0530 Subject: implement forget for cluster/unify inode_ctx_put() would set a list allocated on heap and would not be free()ed anywhere. Signed-off-by: Anand V. Avati --- xlators/cluster/unify/src/unify.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'xlators') diff --git a/xlators/cluster/unify/src/unify.c b/xlators/cluster/unify/src/unify.c index 6c3dc0bd242..337cd46882e 100644 --- a/xlators/cluster/unify/src/unify.c +++ b/xlators/cluster/unify/src/unify.c @@ -4082,6 +4082,23 @@ unify_xattrop (call_frame_t *frame, xlator_t *this, return 0; } +int +unify_forget (xlator_t *this, + inode_t *inode) +{ + int16_t *list = NULL; + uint64_t tmp_list = 0; + + if (!S_ISDIR(inode->st_mode)) { + inode_ctx_get (inode, this, &tmp_list); + if (tmp_list) { + list = (int16_t *)(long)tmp_list; + FREE (list); + } + } + + return 0; +} /** * notify @@ -4435,6 +4452,7 @@ struct xlator_mops mops = { }; struct xlator_cbks cbks = { + .forget = unify_forget, }; struct volume_options options[] = { -- cgit