From owner-svn-src-head@freebsd.org Wed May 6 00:44:04 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0F9532DAFCB; Wed, 6 May 2020 00:44:04 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49GyX36fQ7z3HNx; Wed, 6 May 2020 00:44:03 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C54D81ED73; Wed, 6 May 2020 00:44:03 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0460i3qE029961; Wed, 6 May 2020 00:44:03 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0460i3IW029960; Wed, 6 May 2020 00:44:03 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202005060044.0460i3IW029960@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Wed, 6 May 2020 00:44:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360678 - head/sys/fs/nfs X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/fs/nfs X-SVN-Commit-Revision: 360678 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 May 2020 00:44:04 -0000 Author: rmacklem Date: Wed May 6 00:44:03 2020 New Revision: 360678 URL: https://svnweb.freebsd.org/changeset/base/360678 Log: Delete unused function newnfs_trimleading. The NFS function called newnfs_trimleading() has not been used by the code in long time. To give you a clue, it still had a K&R style function declaration. Delete it, since it is just cruft, as a part of the NFS mbuf handling cleanup in preparation for adding ext_pgs mbuf support. The ext_pgs mbuf support for the build/send side is needed by nfs-over-tls. Modified: head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfs_var.h Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Wed May 6 00:25:43 2020 (r360677) +++ head/sys/fs/nfs/nfs_commonsubs.c Wed May 6 00:44:03 2020 (r360678) @@ -1006,53 +1006,6 @@ nfsaddr2_match(NFSSOCKADDR_T nam1, NFSSOCKADDR_T nam2) return (0); } - -/* - * Trim the stuff already dissected off the mbuf list. - */ -APPLESTATIC void -newnfs_trimleading(nd) - struct nfsrv_descript *nd; -{ - struct mbuf *m, *n; - int offs; - - /* - * First, free up leading mbufs. - */ - if (nd->nd_mrep != nd->nd_md) { - m = nd->nd_mrep; - while (m->m_next != nd->nd_md) { - if (m->m_next == NULL) - panic("nfsm trim leading"); - m = m->m_next; - } - m->m_next = NULL; - m_freem(nd->nd_mrep); - } - m = nd->nd_md; - - /* - * Now, adjust this mbuf, based on nd_dpos. - */ - offs = nd->nd_dpos - mtod(m, caddr_t); - if (offs == m->m_len) { - n = m; - m = m->m_next; - if (m == NULL) - panic("nfsm trim leading2"); - n->m_next = NULL; - m_freem(n); - } else if (offs > 0) { - m->m_len -= offs; - m->m_data += offs; - } else if (offs < 0) - panic("nfsm trimleading offs"); - nd->nd_mrep = m; - nd->nd_md = m; - nd->nd_dpos = mtod(m, caddr_t); -} - /* * Trim trailing data off the mbuf list being built. */ Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Wed May 6 00:25:43 2020 (r360677) +++ head/sys/fs/nfs/nfs_var.h Wed May 6 00:44:03 2020 (r360678) @@ -324,7 +324,6 @@ int nfsm_mbufuio(struct nfsrv_descript *, struct uio * int nfsm_fhtom(struct nfsrv_descript *, u_int8_t *, int, int); int nfsm_advance(struct nfsrv_descript *, int, int); void *nfsm_dissct(struct nfsrv_descript *, int, int); -void newnfs_trimleading(struct nfsrv_descript *); void newnfs_trimtrailing(struct nfsrv_descript *, struct mbuf *, caddr_t); void newnfs_copycred(struct nfscred *, struct ucred *);