Completely disable the zfs binary from attempting to directly update
/etc/mtab. The Linux port relies entirely on the mount.zfs helper
to safely update /etc/mtab. If we left the /etc/mtab updates to
the zfs binary then they could race with concurrent non-zfs mounts.
Routing everything through the system mount command ensures the
/etc/mtab updates are locked properly.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #329
/*
* Run the appropriate command.
*/
- libzfs_mnttab_cache(g_zfs, B_TRUE);
+ libzfs_mnttab_cache(g_zfs, B_FALSE);
if (find_command_idx(cmdname, &i) == 0) {
current_command = &command_table[i];
ret = command_table[i].func(argc - 1, argv + 1);
usage(B_FALSE);
ret = 1;
}
- libzfs_mnttab_cache(g_zfs, B_FALSE);
libzfs_fini(g_zfs);
(void) fclose(mnttab_file);