* otherwise it is freed on the final call to cl_sync_io_note
* (either in this function or from a ptlrpcd daemon)
*/
- sdio = cl_sub_dio_alloc(ll_dio_aio, sync_submit);
+ sdio = cl_sub_dio_alloc(ll_dio_aio, rw == WRITE, sync_submit);
if (!sdio)
GOTO(out, result = -ENOMEM);