HomeFreeBSD

Make sbuf_drain safe for external use

Description

Make sbuf_drain safe for external use

While sbuf_drain was an internal function, two
KASSERTS checked the sanity of it being called.
However, an external caller may be ignorant if
there is any data to drain, or if an error has
already accumulated. Be nice and return immediately
with the accumulated error.

MFC after: 2 weeks
Reviewed By: tuexen, transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D29544

Details

Provenance
rscheffAuthored on Apr 2 2021, 6:11 PM
Reviewer
transport
Differential Revision
D29544: Make sbuf_drain safe for external use
Parents
rG36d6e65722ea: netmap: update unit tests with libnetmap tests
Branches
Unknown
Tags
Unknown