summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/features/quota/src/quota.c10
-rw-r--r--xlators/features/quota/src/quota.h1
2 files changed, 3 insertions, 8 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index 20e90cdec..89f390732 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -135,11 +135,8 @@ quota_local_new ()
int32_t ret = 0;
QUOTA_LOCAL_ALLOC_OR_GOTO (local, quota_local_t, err);
-
- LOCK_INIT (&local->lock);
-
err:
- return NULL;
+ return local;
}
@@ -1095,7 +1092,6 @@ quota_create (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
quota_local_t *local = NULL;
call_stub_t *stub = NULL;
int32_t validate_count = 0;
- quota_inode_ctx_t *ctx = NULL;
local = quota_local_new ();
if (local == NULL) {
@@ -1122,12 +1118,12 @@ quota_create (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
quota_check_limit (frame, loc->parent, this, NULL, 0);
- LOCK (&ctx->lock);
+ LOCK (&local->lock);
{
local->link_count = 0;
validate_count = local->validate_count;
}
- UNLOCK (&ctx->lock);
+ UNLOCK (&local->lock);
if (validate_count == 0) {
call_resume (stub);
diff --git a/xlators/features/quota/src/quota.h b/xlators/features/quota/src/quota.h
index f849b86e2..1f0546d4e 100644
--- a/xlators/features/quota/src/quota.h
+++ b/xlators/features/quota/src/quota.h
@@ -90,7 +90,6 @@
STACK_UNWIND_STRICT (fop, frame, params); \
quota_local_cleanup (_this, _local); \
GF_FREE (_local); \
- gf_log (this->name, GF_LOG_INFO, "stack unwind"); \
} while (0)
#define QUOTA_FREE_CONTRIBUTION_NODE(_contribution) \