diff --git a/lib/libzfs/libzfs_import.c b/lib/libzfs/libzfs_import.c index 25f369db96..99c3d9998f 100644 --- a/lib/libzfs/libzfs_import.c +++ b/lib/libzfs/libzfs_import.c @@ -599,7 +599,7 @@ fix_paths(nvlist_t *nv, name_entry_t *names) } /* Prefer paths earlier in the search order. */ - if (best->ne_num_labels == best->ne_num_labels && + if (ne->ne_num_labels == best->ne_num_labels && ne->ne_order < best->ne_order) { best = ne; continue;