What about just passing done_before as an argument to iomap_dio_complete? gfs2 would have to switch to __iomap_dio_rw + iomap_dio_complete instead of iomap_dio_rw for that, and it obviously won't work for async completions, but you force sync in this case anyway, right?