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

Ngie Cooper yaneurabeya at gmail.com
Wed Oct 4 15:07:37 UTC 2017


> 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


More information about the svn-src-head mailing list