Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions xlators/cluster/ec/src/ec-inode-read.c
Original file line number Diff line number Diff line change
Expand Up @@ -1353,6 +1353,7 @@ ec_manager_readv(ec_fop_data_t *fop, int32_t state)
{
ec_cbk_data_t *cbk;
ec_t *ec = fop->xl->private;
uintptr_t inode_read_mask;

switch (state) {
case EC_STATE_INIT:
Expand All @@ -1372,8 +1373,8 @@ ec_manager_readv(ec_fop_data_t *fop, int32_t state)
return EC_STATE_DISPATCH;

case EC_STATE_DISPATCH:
uintptr_t inode_read_mask = ec_inode_readmask_get(fop->fd->inode,
fop->xl);
inode_read_mask = ec_inode_readmask_get(fop->fd->inode,
fop->xl);
if (inode_read_mask != 0) {
fop->mask &= inode_read_mask;
} else if (ec->read_mask) {
Expand Down
3 changes: 1 addition & 2 deletions xlators/mgmt/glusterd/src/glusterd-handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -5513,8 +5513,7 @@ glusterd_print_client_details(FILE *fp, dict_t *dict,
}
if (args.dict)
dict_unref(args.dict);
if (args.errstr)
GF_FREE(args.errstr);
gd_syncargs_fini(&args);

return ret;
}
Expand Down
10 changes: 9 additions & 1 deletion xlators/mgmt/glusterd/src/glusterd-syncop.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ gd_syncargs_fini(struct syncargs *args)
pthread_mutex_destroy(&args->lock_dict);
syncbarrier_destroy(&args->barrier);
}
if (args->errstr) {
GF_FREE(args->errstr);
args->errstr = NULL;
}
}

static void
Expand Down Expand Up @@ -1591,8 +1595,10 @@ gd_syncop_mgmt_brick_op(struct rpc_clnt *rpc, glusterd_pending_node_t *pnode,
if (args.errstr) {
if ((strlen(args.errstr) > 0) && errstr)
*errstr = args.errstr;
else
else {
GF_FREE(args.errstr);
args.errstr = NULL;
}
}

if (GD_OP_STATUS_VOLUME == op) {
Expand Down Expand Up @@ -1642,6 +1648,7 @@ gd_syncop_mgmt_brick_op(struct rpc_clnt *rpc, glusterd_pending_node_t *pnode,
}
}
gd_brick_op_req_free(req);
gd_syncargs_fini(&args);
return args.op_ret;
}

Expand Down Expand Up @@ -1869,6 +1876,7 @@ gd_lock_op_phase(glusterd_conf_t *conf, glusterd_op_t op, dict_t *op_ctx,
"to %d peers. Returning %d",
gd_op_list[op], peer_cnt, ret);
out:
gd_syncargs_fini(&args);
return ret;
}

Expand Down