Skip to content
This repository was archived by the owner on May 3, 2024. It is now read-only.
Merged
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
6 changes: 5 additions & 1 deletion motr/io_req_fop.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,7 @@ M0_INTERNAL int ioreq_fop_dgmode_read(struct ioreq_fop *irfop)
ioo_nwxfer, &ioo_bobtype);
rbulk = &irfop->irf_iofop.if_rbulk;

m0_mutex_lock(&rbulk->rb_mutex);
m0_tl_for (rpcbulk, &rbulk->rb_buflist, rbuf) {

index = rbuf->bb_zerovec.z_index;
Expand Down Expand Up @@ -783,10 +784,13 @@ M0_INTERNAL int ioreq_fop_dgmode_read(struct ioreq_fop *irfop)
rc = map->pi_ops->pi_dgmode_process(map,
irfop->irf_tioreq, &index[seg - cnt],
cnt);
if (rc != 0)
if (rc != 0) {
m0_mutex_unlock(&rbulk->rb_mutex);
return M0_ERR(rc);
}
}
} m0_tl_endfor;
m0_mutex_unlock(&rbulk->rb_mutex);
return M0_RC(0);
}

Expand Down