diff --git a/lib/libzfs/libzfs_import.c b/lib/libzfs/libzfs_import.c index e40f6f6947..d0df9e3c2a 100644 --- a/lib/libzfs/libzfs_import.c +++ b/lib/libzfs/libzfs_import.c @@ -221,7 +221,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;