diff options
| author | Basavanagowda Kanur <gowda@gluster.com> | 2009-03-13 01:12:20 +0530 | 
|---|---|---|
| committer | Anand V. Avati <avati@amp.gluster.com> | 2009-03-13 11:01:42 +0530 | 
| commit | 473d02d1698259b4a0a6c22fdf70071e69c6e987 (patch) | |
| tree | 530990755611ac6fd8187369ed1f2c4b6c78a96f | |
| parent | 215a91c4729bff06899375c02ae1568f24d683a9 (diff) | |
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 <avati@amp.gluster.com>
| -rw-r--r-- | xlators/cluster/unify/src/unify.c | 18 | 
1 files changed, 18 insertions, 0 deletions
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[] = {  | 
