testcase: f_mke2fs_baddisk Signed-off-by: Dmitry Monakhov <dmonakhov@xxxxxxxxxx> --- lib/ext2fs/unix_io.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c index 429ea24..6c54cbe 100644 --- a/lib/ext2fs/unix_io.c +++ b/lib/ext2fs/unix_io.c @@ -1030,7 +1030,10 @@ static errcode_t unix_flush(io_channel channel) #ifndef NO_IO_CACHE retval = flush_cached_blocks(channel, data, 0); #endif - fsync(data->dev); + if(fsync(data->dev)) { + if (!retval) + retval = errno; + } return retval; } -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html