Successful flushing is reported by returning 1 instead of 0. Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>