summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/protocol/server/src/server3_1-fops.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/protocol/server/src/server3_1-fops.c b/xlators/protocol/server/src/server3_1-fops.c
index 289489e506e..a23efaadd39 100644
--- a/xlators/protocol/server/src/server3_1-fops.c
+++ b/xlators/protocol/server/src/server3_1-fops.c
@@ -2514,6 +2514,14 @@ server_create_resume (call_frame_t *frame, xlator_t *bound_xl)
state->loc.inode = inode_new (state->itable);
state->fd = fd_create (state->loc.inode, frame->root->pid);
+ if (!state->fd) {
+ gf_log ("server", GF_LOG_ERROR, "fd creation for the inode %s "
+ "failed", state->loc.inode?
+ uuid_utoa (state->loc.inode->gfid):NULL);
+ state->resolve.op_ret = -1;
+ state->resolve.op_errno = ENOMEM;
+ goto err;
+ }
state->fd->flags = state->flags;
STACK_WIND (frame, server_create_cbk,