Print this page
11083 support NFS server in zone
Portions contributed by: Dan Kruchinin <dan.kruchinin@nexenta.com>
Portions contributed by: Stepan Zastupov <stepan.zastupov@gmail.com>
Portions contributed by: Joyce McIntosh <joyce.mcintosh@nexenta.com>
Portions contributed by: Mike Zeller <mike@mikezeller.net>
Portions contributed by: Dan McDonald <danmcd@joyent.com>
Portions contributed by: Gordon Ross <gordon.w.ross@gmail.com>
Portions contributed by: Vitaliy Gusev <gusev.vitaliy@gmail.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Reviewed by: Rob Gittins <rob.gittins@nexenta.com>
Reviewed by: Sanjay Nadkarni <sanjay.nadkarni@nexenta.com>
Reviewed by: Jason King <jbk@joyent.com>
Reviewed by: C Fraire <cfraire@me.com>
Change-Id: I22f289d357503f9b48a0bc2482cc4328a6d43d16
        
@@ -21,10 +21,14 @@
 
 /*
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
+/*
+ * Copyright 2018 Nexenta Systems, Inc.
+ */
+
 #include <sys/atomic.h>
 #include <sys/cmn_err.h>
 #include <sys/errno.h>
 #include <sys/mount.h>
 #include <sharefs/sharefs.h>
@@ -241,20 +245,10 @@
         data = vfsp->vfs_data;
         if (data->sharefs_vfs_root->v_count > 1)
                 return (EBUSY);
 
         /*
-         * Only allow an unmount iff there are no entries in memory.
-         */
-        rw_enter(&sharetab_lock, RW_READER);
-        if (sharetab_size != 0) {
-                rw_exit(&sharetab_lock);
-                return (EBUSY);
-        }
-        rw_exit(&sharetab_lock);
-
-        /*
          * Release the last hold on the root vnode
          */
         VN_RELE(data->sharefs_vfs_root);
 
         kmem_free(data, sizeof (sharefs_vfs_t));