Nik Nyby 9866ad31fd fs/mfs: Remove a few assert.h includes
Those are unnecessary.

Closes #241

Change-Id: I26db0f07c65e7d078e642001b97e6d4313e6660a
2018-03-23 07:36:59 +01:00

24 lines
747 B
C

#include "fs.h"
#include "inode.h"
#include "clean.h"
/*===========================================================================*
* fs_sync *
*===========================================================================*/
void fs_sync(void)
{
/* Perform the sync() system call. Flush all the tables.
* The order in which the various tables are flushed is critical. The
* blocks must be flushed last, since rw_inode() leaves its results in
* the block cache.
*/
struct inode *rip;
/* Write all the dirty inodes to the disk. */
for(rip = &inode[0]; rip < &inode[NR_INODES]; rip++)
if(rip->i_count > 0 && IN_ISDIRTY(rip)) rw_inode(rip, WRITING);
/* Write all the dirty blocks to the disk. */
lmfs_flushall();
}