• Bob Peterson's avatar
    gfs2: Don't ignore inode write errors during inode_go_sync · bbae10fa
    Bob Peterson authored
    Before for this patch, function inode_go_sync ignored io errors
    during inode_go_sync, overwriting them with metadata write errors:
    
    		error = filemap_fdatawait(mapping);
    		mapping_set_error(mapping, error);
    	}
    	error = filemap_fdatawait(metamapping);
    	...
    	return error;
    
    So any errors returned by the inode write would be forgotten if the
    metadata write succeeded. This patch still does both writes, but
    only sets error if it's still zero. That way, any errors will be
    reported by to the caller, do_xmote, which will take appropriate
    action and report the error.
    Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
    Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
    bbae10fa
glops.c 19.8 KB