diff options
Diffstat (limited to 'xlators/features/marker/src/marker-quota-helper.h')
-rw-r--r-- | xlators/features/marker/src/marker-quota-helper.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/xlators/features/marker/src/marker-quota-helper.h b/xlators/features/marker/src/marker-quota-helper.h index b333a0ec52f..7450a6e3604 100644 --- a/xlators/features/marker/src/marker-quota-helper.h +++ b/xlators/features/marker/src/marker-quota-helper.h @@ -13,10 +13,14 @@ #include "marker.h" -#define QUOTA_FREE_CONTRIBUTION_NODE(_contribution) \ - do { \ - list_del (&_contribution->contri_list); \ - GF_FREE (_contribution); \ +#define QUOTA_FREE_CONTRIBUTION_NODE(ctx, _contribution) \ + do { \ + LOCK (&ctx->lock); \ + { \ + list_del (&_contribution->contri_list); \ + GF_REF_PUT (_contribution); \ + } \ + UNLOCK (&ctx->lock); \ } while (0) #define QUOTA_SAFE_INCREMENT(lock, var) \ @@ -62,6 +66,12 @@ mq_local_ref (quota_local_t *); int32_t mq_local_unref (xlator_t *, quota_local_t *); +void +mq_contri_fini (void *data); + +inode_contribution_t* +mq_contri_init (inode_t *inode); + inode_contribution_t * mq_get_contribution_node (inode_t *, quota_inode_ctx_t *); |