Greg Kurz f74e27bf0f 9pfs: only free completed request if not flushed
If a PDU has a flush request pending, the current code calls pdu_free()
twice:

1) pdu_complete()->pdu_free() with pdu->cancelled set, which does nothing

2) v9fs_flush()->pdu_free() with pdu->cancelled cleared, which moves the
   PDU back to the free list.

This works but it complexifies the logic of pdu_free().

With this patch, pdu_complete() only calls pdu_free() if no flush request
is pending, i.e. qemu_co_queue_next() returns false.

Since pdu_free() is now supposed to be called with pdu->cancelled cleared,
the check in pdu_free() is dropped and replaced by an assertion.

Signed-off-by: Greg Kurz <groug@kaod.org>
2016-10-17 14:13:58 +02:00
..
2016-10-04 13:28:07 +01:00
2016-10-10 16:23:40 +01:00
2016-10-10 16:23:40 +01:00
2016-10-08 09:02:19 +03:00
2016-10-04 13:28:09 +01:00
2016-06-17 16:33:48 +10:00
2016-10-10 16:23:40 +01:00
2016-09-29 12:07:51 +01:00
2016-06-14 15:59:13 +01:00
2016-10-10 16:23:40 +01:00
2016-10-04 14:25:08 +01:00
2016-10-10 10:39:29 +01:00
2016-05-18 15:04:27 +03:00
2016-09-23 11:42:52 +08:00
2016-09-08 18:05:21 +04:00
2016-10-04 10:00:25 +02:00
2016-10-10 02:21:43 +03:00
2016-09-23 11:42:52 +08:00
2016-07-29 00:07:09 +03:00
2016-01-29 15:07:25 +00:00
2016-09-22 18:13:08 +01:00
2016-09-15 15:32:22 +03:00
2016-09-29 11:43:22 +08:00
2016-10-04 13:28:07 +01:00
2016-10-10 10:39:29 +01:00
2016-09-15 15:32:22 +03:00
2016-10-10 16:23:40 +01:00
2016-10-04 13:28:07 +01:00