mm: variable length argument support
[pandora-kernel.git] / fs / gfs2 / glops.c
index 39c8ae2..777ca46 100644 (file)
@@ -156,17 +156,14 @@ static void inode_go_sync(struct gfs2_glock *gl)
                ip = NULL;
 
        if (test_bit(GLF_DIRTY, &gl->gl_flags)) {
-               gfs2_log_flush(gl->gl_sbd, gl);
                if (ip)
                        filemap_fdatawrite(ip->i_inode.i_mapping);
+               gfs2_log_flush(gl->gl_sbd, gl);
                gfs2_meta_sync(gl);
                if (ip) {
                        struct address_space *mapping = ip->i_inode.i_mapping;
                        int error = filemap_fdatawait(mapping);
-                       if (error == -ENOSPC)
-                               set_bit(AS_ENOSPC, &mapping->flags);
-                       else if (error)
-                               set_bit(AS_EIO, &mapping->flags);
+                       mapping_set_error(mapping, error);
                }
                clear_bit(GLF_DIRTY, &gl->gl_flags);
                gfs2_ail_empty_gl(gl);