diff options
Diffstat (limited to 'xlators/cluster/stripe/src/stripe.c')
-rw-r--r-- | xlators/cluster/stripe/src/stripe.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c index be223276879..63c75e13d08 100644 --- a/xlators/cluster/stripe/src/stripe.c +++ b/xlators/cluster/stripe/src/stripe.c @@ -4955,10 +4955,15 @@ stripe_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this, out: if (!count) { /* all entries are directories */ - frame->local = NULL; - STRIPE_STACK_UNWIND (readdir, frame, local->op_ret, - local->op_errno, &local->entries, NULL); - gf_dirent_free (&local->entries); + if (frame) + frame->local = NULL; + STRIPE_STACK_UNWIND (readdir, frame, + local ? local->op_ret : -1, + local ? local->op_errno : EINVAL, + local ? &local->entries : NULL, + NULL); + if (local) + gf_dirent_free (&local->entries); stripe_local_wipe (local); mem_put (local); } @@ -4967,6 +4972,7 @@ out: return 0; } + int32_t stripe_readdirp (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size, off_t off, dict_t *xdata) |