mirror of https://github.com/schoebel/mars
fix race in completion code
This commit is contained in:
parent
b97aa05479
commit
b53ba3124b
|
@ -144,7 +144,6 @@ void log_flush(struct log_status *logst)
|
|||
logst->count = 0;
|
||||
logst->log_mref = NULL;
|
||||
|
||||
if (cb_info->nr_cb > 0) {
|
||||
down(&cb_info->mutex);
|
||||
for (i = 0; i < cb_info->nr_cb; i++) {
|
||||
void (*cbf)(void *private) = cb_info->preios[i];
|
||||
|
@ -153,7 +152,7 @@ void log_flush(struct log_status *logst)
|
|||
}
|
||||
}
|
||||
up(&cb_info->mutex);
|
||||
}
|
||||
|
||||
put_log_cb_info(cb_info);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(log_flush);
|
||||
|
|
Loading…
Reference in New Issue