diff mbox

[for-2.8,3/5] 9pfs: always free fids in virtfs_reset()

Message ID 148007487565.16557.8251256690444313651.stgit@bahia
State New
Headers show

Commit Message

Greg Kurz Nov. 25, 2016, 11:54 a.m. UTC
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 <groug@kaod.org>
---
 hw/9pfs/9p.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
diff mbox

Patch

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);
     }
 }