hyperv/vmbus: Always try disconnect/free bufring memory upon channel close
While I'm here, minor wording and style changes. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8598
This commit is contained in:
parent
043a26ce24
commit
845be79221
@ -792,7 +792,7 @@ vmbus_chan_close_internal(struct vmbus_channel *chan)
|
|||||||
vmbus_chan_printf(chan,
|
vmbus_chan_printf(chan,
|
||||||
"can not get msg hypercall for chclose(chan%u)\n",
|
"can not get msg hypercall for chclose(chan%u)\n",
|
||||||
chan->ch_id);
|
chan->ch_id);
|
||||||
return;
|
goto disconnect;
|
||||||
}
|
}
|
||||||
|
|
||||||
req = vmbus_msghc_dataptr(mh);
|
req = vmbus_msghc_dataptr(mh);
|
||||||
@ -806,11 +806,13 @@ vmbus_chan_close_internal(struct vmbus_channel *chan)
|
|||||||
vmbus_chan_printf(chan,
|
vmbus_chan_printf(chan,
|
||||||
"chclose(chan%u) msg hypercall exec failed: %d\n",
|
"chclose(chan%u) msg hypercall exec failed: %d\n",
|
||||||
chan->ch_id, error);
|
chan->ch_id, error);
|
||||||
return;
|
goto disconnect;
|
||||||
} else if (bootverbose) {
|
|
||||||
vmbus_chan_printf(chan, "close chan%u\n", chan->ch_id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bootverbose)
|
||||||
|
vmbus_chan_printf(chan, "chan%u closed\n", chan->ch_id);
|
||||||
|
|
||||||
|
disconnect:
|
||||||
/*
|
/*
|
||||||
* Disconnect the TX+RX bufrings from this channel.
|
* Disconnect the TX+RX bufrings from this channel.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user