diff --git a/fs/fs_initialize.c b/fs/fs_initialize.c index a598f9b7e86..513fc104b0f 100644 --- a/fs/fs_initialize.c +++ b/fs/fs_initialize.c @@ -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; }