summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src/marker-quota.c
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2011-08-18 00:12:25 +0530
committerVijay Bellur <vijay@gluster.com>2011-08-20 00:09:36 -0700
commitc4166b86203562b6383ddfa160bb7d925af8b72c (patch)
tree3f41181c0d0d2956d5499733c71c6f73a7d2bfdd /xlators/features/marker/src/marker-quota.c
parentec5f1f08304bf40ca552f027d92ed1b37b7f5b15 (diff)
features/marker: Correct behavior of local_ref/unref
Change-Id: I8266754d4b53b525b13fed2383cf95d77bab47ba BUG: 3429 Reviewed-on: http://review.gluster.com/252 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/features/marker/src/marker-quota.c')
-rw-r--r--xlators/features/marker/src/marker-quota.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c
index 3e9a6890a6a..ac59032cad9 100644
--- a/xlators/features/marker/src/marker-quota.c
+++ b/xlators/features/marker/src/marker-quota.c
@@ -535,7 +535,7 @@ quota_readdir_cbk (call_frame_t *frame,
goto out;
}
- newframe->local = local;
+ newframe->local = quota_local_ref (local);
dict = dict_new ();
if (!dict) {
@@ -2092,9 +2092,7 @@ quota_inode_remove_done (call_frame_t *frame, void *cookie, xlator_t *this,
start_quota_txn (this, &local->loc, local->ctx, local->contri);
}
- /* TODO: free local in quota_local_unref only*/
quota_local_unref (this, local);
- GF_FREE (local);
return 0;
}
@@ -2286,10 +2284,8 @@ reduce_parent_size (xlator_t *this, loc_t *loc, int64_t contri)
ret = 0;
out:
- if (local != NULL) {
+ if (local != NULL)
quota_local_unref (this, local);
- GF_FREE (local);
- }
return ret;
}