X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=lib%2Flibzfs%2Flibzfs_mount.c;h=0fe83e550c144efd0468df9a86aa7511a2f65b7f;hb=756c3e5a9ce36461939a8dc421918e1c3a379fa6;hp=6758f6a0946e5d60a199ddfd2fe09b401cc141a6;hpb=52e7c3a2e503f78a44fbe5fd9299b11c3aa98651;p=zfs.git diff --git a/lib/libzfs/libzfs_mount.c b/lib/libzfs/libzfs_mount.c index 6758f6a..0fe83e5 100644 --- a/lib/libzfs/libzfs_mount.c +++ b/lib/libzfs/libzfs_mount.c @@ -440,9 +440,11 @@ zfs_mount(zfs_handle_t *zhp, const char *options, int flags) /* * Determine if the mountpoint is empty. If so, refuse to perform the - * mount. We don't perform this check if 'remount' is specified. + * mount. We don't perform this check if 'remount' is + * specified or if overlay option(-O) is given */ - if (!remount && !dir_is_empty(mountpoint)) { + if ((flags & MS_OVERLAY) == 0 && !remount && + !dir_is_empty(mountpoint)) { zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, "directory is not empty")); return (zfs_error_fmt(hdl, EZFS_MOUNTFAILED,