summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src/marker.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/marker/src/marker.c')
-rw-r--r--xlators/features/marker/src/marker.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index 43bb58cd83e..4062b8d0b83 100644
--- a/xlators/features/marker/src/marker.c
+++ b/xlators/features/marker/src/marker.c
@@ -1886,11 +1886,17 @@ err:
int32_t
marker_forget (xlator_t *this, inode_t *inode)
{
- marker_inode_ctx_t *ctx = NULL;
+ marker_inode_ctx_t *ctx = NULL;
+ uint64_t value = 0;
- if (inode_ctx_del (inode, this, (uint64_t *) &ctx) != 0)
+ if (inode_ctx_del (inode, this, &value) != 0)
goto out;
+ ctx = (marker_inode_ctx_t *)(unsigned long)value;
+ if (ctx == NULL) {
+ goto out;
+ }
+
quota_forget (this, ctx->quota_ctx);
GF_FREE (ctx);