Date: Wed, 4 Oct 2017 17:31:27 +0200 From: Emmanuel Vadot <manu@bidouilliste.com> To: Ngie Cooper <yaneurabeya@gmail.com> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r324257 - head/usr.sbin/mountd Message-ID: <20171004173127.a0748a48e208b1dd0712d755@bidouilliste.com> In-Reply-To: <C3FC78EB-1445-4AB4-845B-1E5491C77241@gmail.com> References: <201710040843.v948huhc028834@repo.freebsd.org> <C3FC78EB-1445-4AB4-845B-1E5491C77241@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 4 Oct 2017 08:07:29 -0700 Ngie Cooper <yaneurabeya@gmail.com> wrote: >=20 > > On Oct 4, 2017, at 01:43, Emmanuel Vadot <manu@FreeBSD.org> wrote: > >=20 > > Author: manu > > Date: Wed Oct 4 08:43:56 2017 > > New Revision: 324257 > > URL: https://svnweb.freebsd.org/changeset/base/324257 > >=20 > > Log: > > mountd: Convert exportlist to SLIST > >=20 > > Use SLIST from sys/queue.h instead of homebrew linked list for the exp= ortlist. > >=20 > > Reviewed by: bapt, rmacklem > > MFC after: 1 week > > Sponsored by: Gandi.net > > Differential Revision: https://reviews.freebsd.org/D12502 > >=20 > > Modified: > > head/usr.sbin/mountd/mountd.c >=20 > ... >=20 > > - ep2 =3D exphead; > > - epp =3D &exphead; > > + SLIST_INSERT_HEAD(&exphead, ep, entries); > >=20 > > - /* > > - * Insert in the list in alphabetical order. > > - */ > > - while (ep2 && strcmp(ep2->ex_fsdir, ep->ex_fsdir) < 0) { > > - epp =3D &ep2->ex_next; > > - ep2 =3D ep2->ex_next; > > - } > > - if (ep2) > > - ep->ex_next =3D ep2; > > - *epp =3D ep; > > ep->ex_flag |=3D EX_LINKED; >=20 > The new code isn?t functionally equivalent to the old code: the mount= list is no longer sorted on insert. Is that intentional? > Thanks, > -Ngie Yes, this give no value to do it. Rick noted that showmount might loose alphabetical order but even before showmount doesn't get the list alphabetically sorted. Cheers, --=20 Emmanuel Vadot <manu@bidouilliste.com> <manu@freebsd.org>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171004173127.a0748a48e208b1dd0712d755>