]> git.proxmox.com Git - mirror_zfs.git/commit - lib/libzfs/libzfs_dataset.c
Prevent duplicate mnttab cache entries
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 13 Jan 2014 21:02:59 +0000 (13:02 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 14 Jan 2014 18:27:12 +0000 (10:27 -0800)
commit741304503a28fc51a6c0a14a0f3c1c88cc825979
treebf8a14489f05b8bd8df9471fea1799bdd49e08f4
parentfd23720ae14dca926800ae70e6c8f4b4f82efc08
Prevent duplicate mnttab cache entries

Under Linux its possible to mount the same filesystem multiple
times in the namespace.  This can be done either with bind mounts
or simply with multiple mount points.  Unfortunately, the mnttab
cache code is implemented using an AVL tree which does not support
duplicate entries.  To avoid this issue this patch updates the
code to check for a duplicate entry before adding a new one.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Michael Martin <mgmartin.mgm@gmail.com>
Closes #2041
lib/libzfs/libzfs_dataset.c