sub_trans st_committed and st_stopped flags take different bit of
the same memory address, so both of them should be set with lock,
but sub_trans_stop_cb() doesn't, which may cause it overriden.
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: Ic3d7d7281b3cf9bd20702be944e14f35200318f1
Reviewed-on: https://review.whamcloud.com/33169
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
struct top_multiple_thandle *tmt = cb->dcb_data;
ENTRY;
+ spin_lock(&tmt->tmt_sub_lock);
list_for_each_entry(st, &tmt->tmt_sub_thandle_list, st_sub_list) {
if (st->st_stopped)
continue;
break;
}
}
+ spin_unlock(&tmt->tmt_sub_lock);
wake_up(&tmt->tmt_stop_waitq);
RETURN_EXIT;