Use wait_for_completion_killable() instead of wait_for_completion()
so that the user process can be killed if there is a problem on the
OST.
Signed-off-by: Emoly Liu <emoly.liu@intel.com>
Change-Id: Ia3ed5cb981755483bd2f4c3f2cb4cc90c3ca5207
Reviewed-on: http://review.whamcloud.com/11021
Tested-by: Jenkins
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
int result = 0;
if (cbargs->opc_rpc_sent) {
- wait_for_completion(&cbargs->opc_sync);
- result = io->ci_result = cbargs->opc_rc;
+ result = wait_for_completion_killable(&cbargs->opc_sync);
+ if (result == 0)
+ result = cbargs->opc_rc;
+ io->ci_result = result;
}
if (result == 0) {
if (oio->oi_lockless) {
struct osc_io *oio = cl2osc_io(env, slice);
struct osc_async_cbargs *cbargs = &oio->oi_cbarg;
- wait_for_completion(&cbargs->opc_sync);
+ result = wait_for_completion_killable(&cbargs->opc_sync);
if (result == 0)
result = cbargs->opc_rc;
}