In insert_update_records_to_replay_list(), if the
dtrq request has been added to the list by another
thread, it should lookup the request in the list
again, otherwise it will cause the following sub req
lookup panic, because the current dtrq was just freed.
Signed-off-by: wang di <di.wang@intel.com>
Change-Id: I766cddbe5abcd96e97a611985032208585573b43
Reviewed-on: http://review.whamcloud.com/15573
Tested-by: Jenkins
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
" mdt_index %u\n", tdtd->tdtd_lut->lut_obd->obd_name,
record->ur_batchid, record->ur_master_transno, mdt_index);
" mdt_index %u\n", tdtd->tdtd_lut->lut_obd->obd_name,
record->ur_batchid, record->ur_master_transno, mdt_index);
/* First try to build the replay update request with the records */
spin_lock(&tdtd->tdtd_replay_list_lock);
dtrq = dtrq_lookup(tdtd, record->ur_batchid);
/* First try to build the replay update request with the records */
spin_lock(&tdtd->tdtd_replay_list_lock);
dtrq = dtrq_lookup(tdtd, record->ur_batchid);
if (rc == -EEXIST) {
/* Some one else already add the record */
dtrq_destroy(dtrq);
if (rc == -EEXIST) {
/* Some one else already add the record */
dtrq_destroy(dtrq);
}
} else {
struct update_records *dtrq_rec;
}
} else {
struct update_records *dtrq_rec;