Print this page
8368 remove warlock leftovers from usr/src/uts
        
*** 297,310 ****
          struct ud_inode *ip = VTOI(vp);
          int32_t error;
  
          ud_printf("udf_read\n");
  
- #ifdef  __lock_lint
-         rw_enter(&ip->i_rwlock, RW_READER);
- #endif
- 
          ASSERT(RW_READ_HELD(&ip->i_rwlock));
  
          if (MANDLOCK(vp, ip->i_char)) {
                  /*
                   * udf_getattr ends up being called by chklock
--- 297,306 ----
*** 319,332 ****
          rw_enter(&ip->i_contents, RW_READER);
          error = ud_rdip(ip, uiop, ioflag, cr);
          rw_exit(&ip->i_contents);
  
  end:
- #ifdef  __lock_lint
-         rw_exit(&ip->i_rwlock);
- #endif
- 
          return (error);
  }
  
  
  int32_t ud_WRITES = 1;
--- 315,324 ----
*** 346,359 ****
          struct ud_inode *ip = VTOI(vp);
          int32_t error = 0;
  
          ud_printf("udf_write\n");
  
- #ifdef  __lock_lint
-         rw_enter(&ip->i_rwlock, RW_WRITER);
- #endif
- 
          ASSERT(RW_WRITE_HELD(&ip->i_rwlock));
  
          if (MANDLOCK(vp, ip->i_char)) {
                  /*
                   * ud_getattr ends up being called by chklock
--- 338,347 ----
*** 388,401 ****
          }
          error = ud_wrip(ip, uiop, ioflag, cr);
          rw_exit(&ip->i_contents);
  
  end:
- #ifdef  __lock_lint
-         rw_exit(&ip->i_rwlock);
- #endif
- 
          return (error);
  }
  
  /* ARGSUSED */
  static int32_t
--- 376,385 ----
*** 743,759 ****
                      vap, &xip, cr, ct);
                  rw_exit(&ip->i_rwlock);
                  ITIMES(ip);
                  ip = xip;
          }
- #ifdef  __lock_lint
-         rw_enter(&ip->i_contents, RW_WRITER);
- #else
          if (ip != NULL) {
                  rw_enter(&ip->i_contents, RW_WRITER);
          }
- #endif
  
          /*
           * If the file already exists and this is a non-exclusive create,
           * check permissions and allow access for non-directories.
           * Read-only create of an existing directory is also allowed.
--- 727,739 ----
*** 798,814 ****
  
          if (error == 0) {
                  *vpp = ITOV(ip);
                  ITIMES(ip);
          }
- #ifdef  __lock_lint
-         rw_exit(&ip->i_contents);
- #else
          if (ip != NULL) {
                  rw_exit(&ip->i_contents);
          }
- #endif
          if (error) {
                  goto out;
          }
  
          /*
--- 778,790 ----
*** 1568,1580 ****
          if (write_lock) {
                  rw_enter(&ip->i_rwlock, RW_WRITER);
          } else {
                  rw_enter(&ip->i_rwlock, RW_READER);
          }
- #ifdef  __lock_lint
-         rw_exit(&ip->i_rwlock);
- #endif
          return (write_lock);
  }
  
  /* ARGSUSED */
  static void
--- 1544,1553 ----
*** 1582,1595 ****
  {
          struct ud_inode *ip = VTOI(vp);
  
          ud_printf("udf_rwunlock\n");
  
- #ifdef  __lock_lint
-         rw_enter(&ip->i_rwlock, RW_WRITER);
- #endif
- 
          rw_exit(&ip->i_rwlock);
  
  }
  
  /* ARGSUSED */
--- 1555,1564 ----
*** 1692,1708 ****
          seqmode = ip->i_nextr == uoff && rw != S_CREATE;
  
          rwtype = RW_READER;
          dolock = (rw_owner(&ip->i_contents) != curthread);
  retrylock:
- #ifdef  __lock_lint
-         rw_enter(&ip->i_contents, rwtype);
- #else
          if (dolock) {
                  rw_enter(&ip->i_contents, rwtype);
          }
- #endif
  
          /*
           * We may be getting called as a side effect of a bmap using
           * fbread() when the blocks might be being allocated and the
           * size has not yet been up'ed.  In this case we want to be
--- 1661,1673 ----
*** 1711,1727 ****
           * to read some frags from the disk into a page if we are
           * extending the number of frags for a given lbn in bmap().
           */
          beyond_eof = uoff + len > ip->i_size + PAGEOFFSET;
          if (beyond_eof && seg != segkmap) {
- #ifdef  __lock_lint
-                 rw_exit(&ip->i_contents);
- #else
                  if (dolock) {
                          rw_exit(&ip->i_contents);
                  }
- #endif
                  return (EFAULT);
          }
  
          /*
           * Must hold i_contents lock throughout the call to pvn_getpages
--- 1676,1688 ----
*** 1781,1799 ****
          }
  
          /*
           * Can be a reader from now on.
           */
- #ifdef  __lock_lint
-         if (rwtype == RW_WRITER) {
-                 rw_downgrade(&ip->i_contents);
-         }
- #else
          if (dolock && rwtype == RW_WRITER) {
                  rw_downgrade(&ip->i_contents);
          }
- #endif
  
          /*
           * We remove PROT_WRITE in cases when the file has UDF holes
           * because we don't  want to call bmap_read() to check each
           * page if it is backed with a disk block.
--- 1742,1754 ----
*** 1909,1925 ****
  
                  plarr[0] = NULL;
          }
  
  update_inode:
- #ifdef  __lock_lint
-         rw_exit(&ip->i_contents);
- #else
          if (dolock) {
                  rw_exit(&ip->i_contents);
          }
- #endif
  
          /*
           * If the inode is not already marked for IACC (in rwip() for read)
           * and the inode is not marked for no access time update (in rwip()
           * for write) then update the inode access time and mod time now.
--- 1864,1876 ----
*** 1955,1967 ****
          int32_t error = 0;
  
          ud_printf("udf_putpage\n");
  
          ip = VTOI(vp);
- #ifdef  __lock_lint
-         rw_enter(&ip->i_contents, RW_WRITER);
- #endif
  
          if (vp->v_count == 0) {
                  cmn_err(CE_WARN, "ud_putpage : bad v_count");
                  error = EINVAL;
                  goto out;
--- 1906,1915 ----
*** 2021,2033 ****
          }
  
          error = ud_putpages(vp, off, len, flags, cr);
  
  out:
- #ifdef  __lock_lint
-         rw_exit(&ip->i_contents);
- #endif
          return (error);
  }
  
  /* ARGSUSED */
  static int32_t
--- 1969,1978 ----
*** 2185,2198 ****
  
          return (error);
  }
  
  uint32_t ud_pageio_reads = 0, ud_pageio_writes = 0;
! #ifndef __lint
! _NOTE(SCHEME_PROTECTS_DATA("safe sharing", ud_pageio_reads))
! _NOTE(SCHEME_PROTECTS_DATA("safe sharing", ud_pageio_writes))
! #endif
  /*
   * Assumption is that there will not be a pageio request
   * to a enbedded file
   */
  /* ARGSUSED */
--- 2130,2140 ----
  
          return (error);
  }
  
  uint32_t ud_pageio_reads = 0, ud_pageio_writes = 0;
! 
  /*
   * Assumption is that there will not be a pageio request
   * to a enbedded file
   */
  /* ARGSUSED */
*** 2227,2243 ****
           */
          if (ip->i_udf == NULL) {
                  return (EIO);
          }
  
- #ifdef  __lock_lint
-         rw_enter(&ip->i_contents, RW_READER);
- #else
          if (dolock) {
                  rw_enter(&ip->i_contents, RW_READER);
          }
- #endif
  
          /*
           * Break the io request into chunks, one for each contiguous
           * stretch of disk blocks in the target file.
           */
--- 2169,2181 ----
*** 2337,2353 ****
                          page_list_concat(&opp, &cpp);
                          page_list_concat(&opp, &npp);
                  }
          }
  
- #ifdef  __lock_lint
-         rw_exit(&ip->i_contents);
- #else
          if (dolock) {
                  rw_exit(&ip->i_contents);
          }
! #endif
          return (error);
  }
  
  
  
--- 2275,2288 ----
                          page_list_concat(&opp, &cpp);
                          page_list_concat(&opp, &npp);
                  }
          }
  
          if (dolock) {
                  rw_exit(&ip->i_contents);
          }
! 
          return (error);
  }
  
  
  
*** 2680,2706 ****
          if (len == 0) {
                  mutex_enter(&ip->i_tlock);
                  ip->i_delayoff = ip->i_delaylen = 0;
                  mutex_exit(&ip->i_tlock);
          }
- #ifdef  __lock_lint
-         rw_enter(&ip->i_contents, RW_READER);
- #else
          dolock = (rw_owner(&ip->i_contents) != curthread);
          if (dolock) {
                  rw_enter(&ip->i_contents, RW_READER);
          }
- #endif
  
          if (!vn_has_cached_data(vp)) {
- #ifdef  __lock_lint
-                 rw_exit(&ip->i_contents);
- #else
                  if (dolock) {
                          rw_exit(&ip->i_contents);
                  }
- #endif
                  return (0);
          }
  
          if (len == 0) {
                  /*
--- 2615,2633 ----
*** 2761,2777 ****
                   */
                  mutex_enter(&ip->i_tlock);
                  ip->i_flag &= ~IMODTIME;
                  mutex_exit(&ip->i_tlock);
          }
- #ifdef  __lock_lint
-         rw_exit(&ip->i_contents);
- #else
          if (dolock) {
                  rw_exit(&ip->i_contents);
          }
- #endif
          return (err);
  }
  
  /* ARGSUSED */
  int32_t
--- 2688,2700 ----
*** 3053,3067 ****
                  }
                  dofree = ud_freebehind &&
                      ip->i_nextr == (off & PAGEMASK) &&
                      off > ud_smallfile;
  
- #ifndef __lock_lint
                  if (rwtype == RW_READER) {
                          rw_exit(&ip->i_contents);
                  }
- #endif
  
                  base = segmap_getmapflt(segkmap, vp, (off + mapon),
                      (uint32_t)n, 1, S_READ);
                  error = uiomove(base + mapon, (long)n, UIO_READ, uio);
  
--- 2976,2988 ----
*** 3089,3103 ****
                          error = segmap_release(segkmap, base, flags);
                  } else    {
                          (void) segmap_release(segkmap, base, flags);
                  }
  
- #ifndef __lock_lint
                  if (rwtype == RW_READER) {
                          rw_enter(&ip->i_contents, rwtype);
                  }
- #endif
          } while (error == 0 && uio->uio_resid > 0 && n != 0);
  out:
          /*
           * Inode is updated according to this table if FRSYNC is set.
           *
--- 3010,3022 ----