diff options
-rw-r--r-- | xlators/protocol/client/src/client-helpers.c | 6 | ||||
-rw-r--r-- | xlators/protocol/client/src/client-rpc-fops_v2.c | 6 | ||||
-rw-r--r-- | xlators/protocol/server/src/server-handshake.c | 2 | ||||
-rw-r--r-- | xlators/protocol/server/src/server-rpc-fops_v2.c | 4 |
4 files changed, 6 insertions, 12 deletions
diff --git a/xlators/protocol/client/src/client-helpers.c b/xlators/protocol/client/src/client-helpers.c index ddb88795fee..f077fc2a73c 100644 --- a/xlators/protocol/client/src/client-helpers.c +++ b/xlators/protocol/client/src/client-helpers.c @@ -247,6 +247,8 @@ unserialize_rsp_direntp (xlator_t *this, fd_t *fd, ret = 0; out: + if (buf) + GF_FREE (buf); return ret; } @@ -474,13 +476,13 @@ client_fd_fop_prepare_local (call_frame_t *frame, fd_t *fd, int64_t remote_fd) clnt_local_t *local = NULL; int ret = 0; - this = frame->this; - if (!frame || !fd) { ret = -EINVAL; goto out; } + this = frame->this; + frame->local = mem_get0 (this->local_pool); if (frame->local == NULL) { ret = -ENOMEM; diff --git a/xlators/protocol/client/src/client-rpc-fops_v2.c b/xlators/protocol/client/src/client-rpc-fops_v2.c index dc5b8d4ac83..6dd3a916f6a 100644 --- a/xlators/protocol/client/src/client-rpc-fops_v2.c +++ b/xlators/protocol/client/src/client-rpc-fops_v2.c @@ -803,9 +803,6 @@ client4_0_setxattr_cbk (struct rpc_req *req, struct iovec *iov, int count, } xdr_to_dict (&rsp.xdata, &xdata); - if (ret < 0) - goto out; - out: op_errno = gf_error_to_errno (rsp.op_errno); if (rsp.op_ret == -1) { @@ -3724,9 +3721,6 @@ unwind: if (rsp_iobuf) iobuf_unref (rsp_iobuf); - if (rsp_iobref) - iobref_unref (rsp_iobref); - CLIENT_STACK_UNWIND (readv, frame, -1, op_errno, NULL, 0, NULL, NULL, NULL); GF_FREE (req.xdata.pairs.pairs_val); diff --git a/xlators/protocol/server/src/server-handshake.c b/xlators/protocol/server/src/server-handshake.c index 494eafe72ea..c0b03510191 100644 --- a/xlators/protocol/server/src/server-handshake.c +++ b/xlators/protocol/server/src/server-handshake.c @@ -272,8 +272,6 @@ server_getspec (rpcsvc_request_t *req) get_checksum_for_file (spec_fd, &checksum); _volfile_update_checksum (this, key, checksum); } - } else { - op_errno = ENOENT; } if (file_len) { diff --git a/xlators/protocol/server/src/server-rpc-fops_v2.c b/xlators/protocol/server/src/server-rpc-fops_v2.c index d1b2a55131b..09d404f2d86 100644 --- a/xlators/protocol/server/src/server-rpc-fops_v2.c +++ b/xlators/protocol/server/src/server-rpc-fops_v2.c @@ -3596,6 +3596,7 @@ server4_0_zerofill(rpcsvc_request_t *req) ret = rpc_receive_common (req, &frame, &state, NULL, &args, xdr_gfx_zerofill_req, GF_FOP_ZEROFILL); if (ret != 0) { + op_errno = -1; goto out; } @@ -3611,8 +3612,6 @@ server4_0_zerofill(rpcsvc_request_t *req) resolve_and_resume (frame, server4_zerofill_resume); out: - - if (op_errno) req->rpc_err = GARBAGE_ARGS; @@ -3635,6 +3634,7 @@ server4_0_ipc (rpcsvc_request_t *req) ret = rpc_receive_common (req, &frame, &state, NULL, &args, xdr_gfx_ipc_req, GF_FOP_IPC); if (ret != 0) { + op_errno = -1; goto out; } |