Call fsync after init writes to install_status.

If first-stage mounting fails when trying to boot a GSI (for example, if
AVB failed), then the boot-counter written to
/metadata/gsi/install_status may not have been synced. In this case the
device will boot loop since the boot counter is never updated.

Simple fix is to call fsync() after writing to install_status. This will
only happen during the first boot to GSI.

Bug: 122556707
Test: manual test
Change-Id: I2301f655c9b7c36d72269740f13b80bf34252844
1 file changed