summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src/marker-quota-helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/marker/src/marker-quota-helper.c')
-rw-r--r--xlators/features/marker/src/marker-quota-helper.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/features/marker/src/marker-quota-helper.c b/xlators/features/marker/src/marker-quota-helper.c
index c56f8eac7d5..a559da808f8 100644
--- a/xlators/features/marker/src/marker-quota-helper.c
+++ b/xlators/features/marker/src/marker-quota-helper.c
@@ -356,12 +356,13 @@ quota_local_ref (quota_local_t *local)
int32_t
quota_local_unref (xlator_t *this, quota_local_t *local)
{
+ int32_t ref = 0;
if (local == NULL)
goto out;
- QUOTA_SAFE_DECREMENT (&local->lock, local->ref);
+ QUOTA_SAFE_DECREMENT (&local->lock, local->ref, ref);
- if (local->ref > 0)
+ if (ref > 0)
goto out;
if (local->fd != NULL)