diff options
Diffstat (limited to 'xlators/cluster/afr/src/afr-open.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-open.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr-open.c b/xlators/cluster/afr/src/afr-open.c index 059d3f9bd71..7a628350c34 100644 --- a/xlators/cluster/afr/src/afr-open.c +++ b/xlators/cluster/afr/src/afr-open.c @@ -130,12 +130,16 @@ afr_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags, if (!local) goto out; + local->op = GF_FOP_OPEN; fd_ctx = afr_fd_ctx_get (fd, this); if (!fd_ctx) { op_errno = ENOMEM; goto out; } + if (!afr_is_consistent_io_possible (local, priv, &op_errno)) + goto out; + local->fd = fd_ref (fd); local->fd_ctx = fd_ctx; fd_ctx->flags = flags; |