summaryrefslogtreecommitdiffstats
path: root/xlators/performance/md-cache/src/md-cache.c
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2019-01-10 11:08:49 -0800
committerRaghavendra G <rgowdapp@redhat.com>2019-01-11 03:23:35 +0000
commitfa7ae128706062afefcb0a3117527b8bef21f396 (patch)
tree70dc227ee6127ccb42b176d8a492db8235e0a9d0 /xlators/performance/md-cache/src/md-cache.c
parent99ac5a83805e46659124acfefbc05c9b6dda1a1b (diff)
performance/md-cache: Fix a crash when statfs caching is enabled
mem_put() in STACK_UNWIND_STRICT causes a crash if frame->local is not null as md-cache obtains local from CALLOC. Changed two occurrences of STACK_UNWIND_STRICT to MDC_STACK_UNWIND as the latter macro does not rely on STACK_UNWIND_STRICT for cleaning up frame->local. fixes: bz#1632503 Change-Id: I1b3edcb9372a164ef73119e99a49e747765d7166 Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/performance/md-cache/src/md-cache.c')
-rw-r--r--xlators/performance/md-cache/src/md-cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c
index 1f19d5b2c79..ff5c8c2f914 100644
--- a/xlators/performance/md-cache/src/md-cache.c
+++ b/xlators/performance/md-cache/src/md-cache.c
@@ -1174,7 +1174,7 @@ uncached:
return 0;
out:
- STACK_UNWIND_STRICT(statfs, frame, op_ret, op_errno, buf, xdata);
+ MDC_STACK_UNWIND(statfs, frame, op_ret, op_errno, buf, xdata);
return 0;
}
@@ -2834,7 +2834,7 @@ mdc_readdirp(call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
dict_unref(xattr_alloc);
return 0;
out:
- STACK_UNWIND_STRICT(readdirp, frame, -1, ENOMEM, NULL, NULL);
+ MDC_STACK_UNWIND(readdirp, frame, -1, ENOMEM, NULL, NULL);
return 0;
}