From a7cdaf3de307c96cb55219a0743962ee1e1fc955 Mon Sep 17 00:00:00 2001 From: Junaid Date: Fri, 1 Jul 2011 05:17:42 +0000 Subject: features/marker-quota: call stack destroy when hardlink count is not greater 1. Signed-off-by: Junaid Signed-off-by: Anand Avati BUG: 2473 (Support for volume and directory level quota) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2473 --- xlators/features/marker/src/marker-quota.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'xlators/features/marker/src/marker-quota.c') diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c index 7518f3253..b11d1d16b 100644 --- a/xlators/features/marker/src/marker-quota.c +++ b/xlators/features/marker/src/marker-quota.c @@ -1975,6 +1975,8 @@ quota_inode_remove_done (call_frame_t *frame, void *cookie, xlator_t *this, return 0; } + frame->local = NULL; + if (local->hl_count > 1) { GET_CONTRI_KEY (contri_key, local->contri->gfid, ret); @@ -1982,6 +1984,8 @@ quota_inode_remove_done (call_frame_t *frame, void *cookie, xlator_t *this, FIRST_CHILD(this)->fops->removexattr, &local->loc, contri_key); ret = 0; + } else { + quota_removexattr_cbk (frame, NULL, this, 0, 0); } if (strcmp (local->parent_loc.path, "/") != 0) { @@ -1990,7 +1994,9 @@ 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; } -- cgit