summaryrefslogtreecommitdiffstats
path: root/glusterfsd/src/gf_attach.c
diff options
context:
space:
mode:
Diffstat (limited to 'glusterfsd/src/gf_attach.c')
-rw-r--r--glusterfsd/src/gf_attach.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/glusterfsd/src/gf_attach.c b/glusterfsd/src/gf_attach.c
index e688c3c9eb4..cb6c0f59b0b 100644
--- a/glusterfsd/src/gf_attach.c
+++ b/glusterfsd/src/gf_attach.c
@@ -75,10 +75,6 @@ send_brick_req(xlator_t *this, struct rpc_clnt *rpc, char *path, int op)
if (!iobref)
goto out;
- frame = create_frame(this, this->ctx->pool);
- if (!frame)
- goto out;
-
iobref_add(iobref, iobuf);
iov.iov_base = iobuf->ptr;
@@ -98,6 +94,12 @@ send_brick_req(xlator_t *this, struct rpc_clnt *rpc, char *path, int op)
sleep(1);
}
+ frame = create_frame(this, this->ctx->pool);
+ if (!frame) {
+ ret = -1;
+ goto out;
+ }
+
/* Send the msg */
ret = rpc_clnt_submit(rpc, &gf_attach_prog, op, my_callback, &iov, 1, NULL,
0, iobref, frame, NULL, 0, NULL, 0, NULL);