git: e6a4b57239da - main - mbuf: restore m_uiotombuf() feature of returning a zero length mbuf
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 14 Apr 2024 17:21:43 UTC
The branch main has been updated by glebius:
URL: https://cgit.FreeBSD.org/src/commit/?id=e6a4b57239dafc6c944473326891d46d966c0264
commit e6a4b57239dafc6c944473326891d46d966c0264
Author: Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2024-04-14 17:21:07 +0000
Commit: Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2024-04-14 17:21:07 +0000
mbuf: restore m_uiotombuf() feature of returning a zero length mbuf
PR: 278340
Fixes: aba79b0f4a3f69f070ace6effd5700d65226bd20
---
sys/kern/uipc_mbuf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index f5f6db752883..d3389aeeccaf 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -1948,7 +1948,7 @@ m_uiotombuf(struct uio *uio, int how, int len, int lspace, int flags)
if (flags & M_EXTPG) {
/* XXX: 'lspace' magically becomes maxseg! */
return (m_uiotombuf_nomap(uio, how, len, lspace, flags));
- } else if (__predict_false(uio->uio_resid + len == 0)) {
+ } else if (__predict_false(uio->uio_resid == 0)) {
struct mbuf *m;
/*