libzfs/mnttab: always enable the cache

There's no real reason not to enable it always; the `zfs` command always
enables it anyway, and right now there's multiple places that do mount
work that don't go through the cache anyway. Having it always be on lets
us remove a bunch of the fallback code.

Sponsored-by: TrueNAS
Reviewed-by: Ameer Hamza <ahamza@ixsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <rob.norris@truenas.com>
Closes #18296
This commit is contained in:
Rob Norris
2026-02-19 11:12:17 +11:00
committed by Brian Behlendorf
parent b5637fba1c
commit 0ecf5e3f62
3 changed files with 22 additions and 39 deletions
-1
View File
@@ -9426,7 +9426,6 @@ main(int argc, char **argv)
/*
* Run the appropriate command.
*/
libzfs_mnttab_cache(g_zfs, B_TRUE);
if (find_command_idx(cmdname, &i) == 0) {
current_command = &command_table[i];
ret = command_table[i].func(argc - 1, newargv + 1);