summaryrefslogtreecommitdiffstats
path: root/xlators/performance/readdir-ahead/src/readdir-ahead.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/performance/readdir-ahead/src/readdir-ahead.c')
-rw-r--r--xlators/performance/readdir-ahead/src/readdir-ahead.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/performance/readdir-ahead/src/readdir-ahead.c b/xlators/performance/readdir-ahead/src/readdir-ahead.c
index 9b0870e2b37..9f129aa08d8 100644
--- a/xlators/performance/readdir-ahead/src/readdir-ahead.c
+++ b/xlators/performance/readdir-ahead/src/readdir-ahead.c
@@ -236,6 +236,10 @@ rda_readdirp(call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
ret = __rda_serve_readdirp (this, ctx, size, &entries,
&op_errno);
serve = _gf_true;
+
+ if (op_errno == ENOENT && !((ctx->state & RDA_FD_EOD) &&
+ (ctx->cur_size == 0)))
+ op_errno = 0;
} else {
ctx->stub = fop_readdirp_stub (frame, NULL, fd, size, off,
xdata);
@@ -380,6 +384,10 @@ out:
ctx->fill_frame = NULL;
}
+ if (op_errno == ENOENT && !((ctx->state & RDA_FD_EOD) &&
+ (ctx->cur_size == 0)))
+ op_errno = 0;
+
UNLOCK(&ctx->lock);
if (serve) {