vfs: Reorder operations during sys_sync
authorJan Kara <jack@suse.cz>
Tue, 3 Jul 2012 14:45:30 +0000 (16:45 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 22 Jul 2012 19:58:41 +0000 (23:58 +0400)
commitb3de653105180b57af90ef2f5b8441f085f4ff56
treee7581933fbb53210620d4181ba2bf16c9d82502c
parenta1177825719ccef3f76ef39bbfd5ebb6087d53c7
vfs: Reorder operations during sys_sync

Change the order of operations during sync from

for_each_sb {
        writeback_inodes_sb();
        sync_fs(nowait);
        __sync_blockdev(nowait);
}
for_each_sb {
        sync_inodes_sb();
        sync_fs(wait);
        __sync_blockdev(wait);
}

to

for_each_sb
        writeback_inodes_sb();
for_each_sb
        sync_fs(nowait);
for_each_sb
        __sync_blockdev(nowait);
for_each_sb
        sync_inodes_sb();
for_each_sb
        sync_fs(wait);
for_each_sb
        __sync_blockdev(wait);

This is a preparation for the following patches in this series.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/sync.c