• Jan Kara's avatar
    vfs: Reorder operations during sys_sync · b3de6531
    Jan Kara authored
    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: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarJan Kara <jack@suse.cz>
    Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    b3de6531
sync.c 10.4 KB