sync: don't block the flusher thread waiting on IO

Imported from
https://github.com/boype/kernel_tuna_kk44/commit/99bb6f813a56bb90f29e4d0
d9d3650dade2c5c9e