1 /* Created (MFS based):
2 * February 2010 (Evgeniy Ivanov)
10 /*===========================================================================*
12 *===========================================================================*/
15 /* Perform the sync() system call. Flush all the tables.
16 * The order in which the various tables are flushed is critical. The
17 * blocks must be flushed last, since rw_inode() leaves its results in
22 if (superblock
->s_rd_only
)
23 return; /* nothing to sync */
25 /* Write all the dirty inodes to the disk. */
26 for(rip
= &inode
[0]; rip
< &inode
[NR_INODES
]; rip
++)
27 if(rip
->i_count
> 0 && rip
->i_dirt
== IN_DIRTY
) rw_inode(rip
, WRITING
);
31 if (superblock
->s_dev
!= NO_DEV
) {
32 superblock
->s_wtime
= clock_time(NULL
);
33 write_super(superblock
);