fs/fs_initialize.c: Sync will only be executed when the add is in reboot state.
In the last change, the assert behavior test was not considered. Therefore, in this change, sync will be performed only when SYS_RESTART/SYS_DOWN situation occurs, avoiding unpredictable results caused by handling locks or semaphores in interrupts.
This commit is contained in:
parent
7485f1c81d
commit
01cfb3b2db
@ -40,7 +40,11 @@
|
||||
static int sync_reboot_handler(FAR struct notifier_block *nb,
|
||||
unsigned long action, FAR void *data)
|
||||
{
|
||||
sync();
|
||||
if (action == SYS_DOWN || action == SYS_RESTART)
|
||||
{
|
||||
sync();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user