mirror of
https://github.com/schoebel/mars
synced 2025-02-18 13:06:58 +00:00
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->count = 0;
|
||||||
logst->log_mref = NULL;
|
logst->log_mref = NULL;
|
||||||
|
|
||||||
if (cb_info->nr_cb > 0) {
|
|
||||||
down(&cb_info->mutex);
|
down(&cb_info->mutex);
|
||||||
for (i = 0; i < cb_info->nr_cb; i++) {
|
for (i = 0; i < cb_info->nr_cb; i++) {
|
||||||
void (*cbf)(void *private) = cb_info->preios[i];
|
void (*cbf)(void *private) = cb_info->preios[i];
|
||||||
@ -153,7 +152,7 @@ void log_flush(struct log_status *logst)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
up(&cb_info->mutex);
|
up(&cb_info->mutex);
|
||||||
}
|
|
||||||
put_log_cb_info(cb_info);
|
put_log_cb_info(cb_info);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(log_flush);
|
EXPORT_SYMBOL_GPL(log_flush);
|
||||||
|
Loading…
Reference in New Issue
Block a user