svn commit: r323974 - head/sys/fs/nfsclient
Rick Macklem
rmacklem at FreeBSD.org
Sun Sep 24 19:43:32 UTC 2017
Author: rmacklem
Date: Sun Sep 24 19:43:31 2017
New Revision: 323974
URL: https://svnweb.freebsd.org/changeset/base/323974
Log:
Remove 0 filling from nfsm_uiombuflist().
nfsm_uiombuflist() zero filled the mbuf list to a multiple of 4bytes
as required for XDR. Unfortunately that modified an mbuf list after
it was m_copym()'d and was broken. This patch removes the zero filling code.
Since nfsm_uiombuflist() is not yet used in head/current, this has no
effect on users.
The function will be used by a future commit of code that adds Flex
File Layout support.
Modified:
head/sys/fs/nfsclient/nfs_clcomsubs.c
Modified: head/sys/fs/nfsclient/nfs_clcomsubs.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clcomsubs.c Sun Sep 24 16:50:10 2017 (r323973)
+++ head/sys/fs/nfsclient/nfs_clcomsubs.c Sun Sep 24 19:43:31 2017 (r323974)
@@ -344,7 +344,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu
struct mbuf *mp, *mp2, *firstmp;
int xfer, left, mlen;
int uiosiz, clflg, rem;
- char *cp, *tcp;
+ char *tcp;
KASSERT(uiop->uio_iovcnt == 1, ("nfsm_uiotombuf: iovcnt != 1"));
@@ -396,19 +396,7 @@ nfsm_uiombuflist(struct uio *uiop, int siz, struct mbu
uiop->uio_iov->iov_len -= uiosiz;
siz -= uiosiz;
}
- if (rem > 0) {
- if (rem > M_TRAILINGSPACE(mp)) {
- NFSMGET(mp);
- mbuf_setlen(mp, 0);
- mbuf_setnext(mp2, mp);
- }
- cp = NFSMTOD(mp, caddr_t) + mbuf_len(mp);
- for (left = 0; left < rem; left++)
- *cp++ = '\0';
- mbuf_setlen(mp, mbuf_len(mp) + rem);
- if (cpp != NULL)
- *cpp = cp;
- } else if (cpp != NULL)
+ if (cpp != NULL)
*cpp = NFSMTOD(mp, caddr_t) + mbuf_len(mp);
if (mbp != NULL)
*mbp = mp;
More information about the svn-src-all
mailing list