Make use of the red-black tree as the original Linux code did instead of interating over the tree like a list.  From Andriy Gapon in FreeBSD.
Make use of the red-black tree as the original Linux code did instead
of interating over the tree like a list.  From Andriy Gapon in FreeBSD.

ok kettenis@

orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars