diff options
Diffstat (limited to 'xlators/cluster/ec')
-rw-r--r-- | xlators/cluster/ec/src/ec-dir-read.c | 12 | ||||
-rw-r--r-- | xlators/cluster/ec/src/ec-inode-read.c | 12 |
2 files changed, 14 insertions, 10 deletions
diff --git a/xlators/cluster/ec/src/ec-dir-read.c b/xlators/cluster/ec/src/ec-dir-read.c index c3b93126944..e44acac85bf 100644 --- a/xlators/cluster/ec/src/ec-dir-read.c +++ b/xlators/cluster/ec/src/ec-dir-read.c @@ -127,13 +127,15 @@ ec_manager_opendir(ec_fop_data_t *fop, int32_t state) return EC_STATE_REPORT; } - err = ec_loc_from_loc(fop->xl, &ctx->loc, &fop->loc[0]); - if (err != 0) { - UNLOCK(&fop->fd->lock); + if (!ctx->loc.inode) { + err = ec_loc_from_loc(fop->xl, &ctx->loc, &fop->loc[0]); + if (err != 0) { + UNLOCK(&fop->fd->lock); - fop->error = -err; + fop->error = -err; - return EC_STATE_REPORT; + return EC_STATE_REPORT; + } } UNLOCK(&fop->fd->lock); diff --git a/xlators/cluster/ec/src/ec-inode-read.c b/xlators/cluster/ec/src/ec-inode-read.c index e64f8814e9b..d13955e4497 100644 --- a/xlators/cluster/ec/src/ec-inode-read.c +++ b/xlators/cluster/ec/src/ec-inode-read.c @@ -774,13 +774,15 @@ ec_manager_open(ec_fop_data_t *fop, int32_t state) return EC_STATE_REPORT; } - err = ec_loc_from_loc(fop->xl, &ctx->loc, &fop->loc[0]); - if (err != 0) { - UNLOCK(&fop->fd->lock); + if (!ctx->loc.inode) { + err = ec_loc_from_loc(fop->xl, &ctx->loc, &fop->loc[0]); + if (err != 0) { + UNLOCK(&fop->fd->lock); - fop->error = -err; + fop->error = -err; - return EC_STATE_REPORT; + return EC_STATE_REPORT; + } } ctx->flags = fop->int32; |