diff options
author | Junaid <junaid@gluster.com> | 2011-07-01 05:17:42 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-07-01 05:25:39 -0700 |
commit | a7cdaf3de307c96cb55219a0743962ee1e1fc955 (patch) | |
tree | b546363574676cf04020e5e6adaba78a31ace875 | |
parent | ac683df2322123472ba52dbeecb9cd5512ecc58c (diff) |
features/marker-quota: call stack destroy when hardlink count is not greater 1.
Signed-off-by: Junaid <junaid@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 2473 (Support for volume and directory level quota)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2473
-rw-r--r-- | xlators/features/marker/src/marker-quota.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c index 7518f325317..b11d1d16b13 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; } |