summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/afr/src/afr-inode-write.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-inode-write.c b/xlators/cluster/afr/src/afr-inode-write.c
index 368a68bd688..7fa6d096ca4 100644
--- a/xlators/cluster/afr/src/afr-inode-write.c
+++ b/xlators/cluster/afr/src/afr-inode-write.c
@@ -348,6 +348,7 @@ afr_open_fd_fix (call_frame_t *frame, xlator_t *this, gf_boolean_t pause_fop)
int ret = 0;
int i = 0;
afr_fd_ctx_t *fd_ctx = NULL;
+ inode_t *inode = NULL;
gf_boolean_t need_self_heal = _gf_false;
int *need_open = NULL;
int need_open_count = 0;
@@ -360,7 +361,10 @@ afr_open_fd_fix (call_frame_t *frame, xlator_t *this, gf_boolean_t pause_fop)
GF_ASSERT (local->fd);
- if (fd_is_anonymous (local->fd)) {
+ inode = local->fd->inode;
+ //gfid is not set in rebalance, that case needs to be handled.
+ if (fd_is_anonymous (local->fd) ||
+ !inode || uuid_is_null (inode->gfid)) {
fop_continue = _gf_true;
goto out;
}