svn commit: r324257 - head/usr.sbin/mountd

Emmanuel Vadot manu at bidouilliste.com
Wed Oct 4 15:31:40 UTC 2017


On Wed, 4 Oct 2017 08:07:29 -0700
Ngie Cooper <yaneurabeya at gmail.com> wrote:

> 
> > On Oct 4, 2017, at 01:43, Emmanuel Vadot <manu at FreeBSD.org> wrote:
> > 
> > Author: manu
> > Date: Wed Oct  4 08:43:56 2017
> > New Revision: 324257
> > URL: https://svnweb.freebsd.org/changeset/base/324257
> > 
> > Log:
> >  mountd: Convert exportlist to SLIST
> > 
> >  Use SLIST from sys/queue.h instead of homebrew linked list for the exportlist.
> > 
> >  Reviewed by:    bapt, rmacklem
> >  MFC after:    1 week
> >  Sponsored by:    Gandi.net
> >  Differential Revision:    https://reviews.freebsd.org/D12502
> > 
> > Modified:
> >  head/usr.sbin/mountd/mountd.c
> 
> ...
> 
> > -            ep2 = exphead;
> > -            epp = &exphead;
> > +            SLIST_INSERT_HEAD(&exphead, ep, entries);
> > 
> > -            /*
> > -             * Insert in the list in alphabetical order.
> > -             */
> > -            while (ep2 && strcmp(ep2->ex_fsdir, ep->ex_fsdir) < 0) {
> > -                epp = &ep2->ex_next;
> > -                ep2 = ep2->ex_next;
> > -            }
> > -            if (ep2)
> > -                ep->ex_next = ep2;
> > -            *epp = ep;
> >            ep->ex_flag |= EX_LINKED;
> 
>     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,

-- 
Emmanuel Vadot <manu at bidouilliste.com> <manu at freebsd.org>


More information about the svn-src-head mailing list