All PDU that may hold a reference on a fid have been cancelled: we can therefore free all the fids.
Signed-off-by: Greg Kurz <gr...@kaod.org> --- hw/9pfs/9p.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 3a48cdcdf975..75c6645de9ac 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -569,11 +569,7 @@ static void coroutine_fn virtfs_reset(V9fsPDU *pdu) fidp = s->fid_list; s->fid_list = fidp->next; - if (fidp->ref) { - fidp->clunked = 1; - } else { - free_fid(pdu, fidp); - } + g_assert(!fidp->ref); free_fid(pdu, fidp); } }