diff options
-rw-r--r-- | hw/9pfs/9p.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 76f90f2b78..558efb41de 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -3473,14 +3473,12 @@ void pdu_submit(V9fsPDU *pdu, P9MsgHeader *hdr) if (pdu->id >= ARRAY_SIZE(pdu_co_handlers) || (pdu_co_handlers[pdu->id] == NULL)) { handler = v9fs_op_not_supp; + } else if (is_ro_export(&s->ctx) && !is_read_only_op(pdu)) { + handler = v9fs_fs_ro; } else { handler = pdu_co_handlers[pdu->id]; } - if (is_ro_export(&s->ctx) && !is_read_only_op(pdu)) { - handler = v9fs_fs_ro; - } - qemu_co_queue_init(&pdu->complete); co = qemu_coroutine_create(handler, pdu); qemu_coroutine_enter(co); |