提交 6868a420 编写于 作者: G Greg Kurz

9pfs: drop useless check in pdu_free()

Out of the three users of pdu_free(), none ever passes a NULL pointer to
this function.
Signed-off-by: NGreg Kurz <groug@kaod.org>
上级 8440e22e
......@@ -626,16 +626,14 @@ V9fsPDU *pdu_alloc(V9fsState *s)
void pdu_free(V9fsPDU *pdu)
{
if (pdu) {
V9fsState *s = pdu->s;
/*
* Cancelled pdu are added back to the freelist
* by flush request .
*/
if (!pdu->cancelled) {
QLIST_REMOVE(pdu, next);
QLIST_INSERT_HEAD(&s->free_list, pdu, next);
}
V9fsState *s = pdu->s;
/*
* Cancelled pdu are added back to the freelist
* by flush request .
*/
if (!pdu->cancelled) {
QLIST_REMOVE(pdu, next);
QLIST_INSERT_HEAD(&s->free_list, pdu, next);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册