Print this page
7378 exported_lock held during nfs4 compound processing

@@ -190,11 +190,11 @@
                 VN_RELE(vp);
                 *vpp = pre_tvp;
                 return (0);
         }
 
-        newexi = checkexport4(&vp->v_vfsp->vfs_fsid, &fid, vp);
+        newexi = checkexport(&vp->v_vfsp->vfs_fsid, &fid, vp);
         if (newexi == NULL) {
                 if (ismntpt == 0) {
                         *vpp = vp;
                 } else {
                         VN_RELE(vp);

@@ -223,10 +223,11 @@
         /* Reset what call_checkauth4() may have set */
         *cs->statusp = NFS4_OK;
 
         if (status != NFS4_OK) {
                 VN_RELE(vp);
+                exi_rele(newexi);
                 if (status == NFS4ERR_DELAY)
                         status = NFS4ERR_ACCESS;
                 return (status);
         }
         *vpp = vp;

@@ -693,12 +694,14 @@
                 if (vp) {
                         VN_RELE(vp);
                         vp = NULL;
                 }
 
-                if (newexi)
+                if (newexi) {
+                        exi_rele(newexi);
                         newexi = NULL;
+                }
 
                 rddir_result_size -= dp->d_reclen;
 
                 /* skip "." and ".." entries */
                 if (dp->d_ino == 0 || NFS_IS_DOTNAME(dp->d_name)) {

@@ -1488,10 +1491,15 @@
                 lastentry_ptr = ptr;
                 nents++;
                 rddir_next_offset = dp->d_off;
         }
 
+        if (newexi) {
+                exi_rele(newexi);
+                newexi = NULL;
+        }
+
         /*
          * Check for the case that another VOP_READDIR() has to be done.
          * - no space encoding error
          * - no entry successfully encoded
          * - still more directory to read