diff options
author | Brian Behlendorf <[email protected]> | 2011-07-21 12:39:42 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2011-08-19 11:53:01 -0700 |
commit | b740d602bdeca757180a7098be28701a7cde7fbd (patch) | |
tree | f39100d339d96dde5a688ff1329bdc2f15998006 | |
parent | ddd052aa8311f846e3d3f7a9ddf1a21d317fb04a (diff) |
Disable zfs /etc/mtab updates
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 <[email protected]>
Issue #329
-rw-r--r-- | cmd/zfs/zfs_main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 54d057b1e..535447712 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -6177,7 +6177,7 @@ main(int argc, char **argv) /* * 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); @@ -6191,7 +6191,6 @@ main(int argc, char **argv) usage(B_FALSE); ret = 1; } - libzfs_mnttab_cache(g_zfs, B_FALSE); libzfs_fini(g_zfs); (void) fclose(mnttab_file); |