Date: Sun, 24 Sep 2017 19:43:31 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r323974 - head/sys/fs/nfsclient Message-ID: <201709241943.v8OJhVNX010608@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709241943.v8OJhVNX010608>