Print this page
8368 remove warlock leftovers from usr/src/uts
@@ -297,14 +297,10 @@
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
@@ -319,14 +315,10 @@
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;
@@ -346,14 +338,10 @@
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
@@ -388,14 +376,10 @@
}
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
@@ -743,17 +727,13 @@
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.
@@ -798,17 +778,13 @@
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;
}
/*
@@ -1568,13 +1544,10 @@
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
@@ -1582,14 +1555,10 @@
{
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 */
@@ -1692,17 +1661,13 @@
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
@@ -1711,17 +1676,13 @@
* 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
@@ -1781,19 +1742,13 @@
}
/*
* 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.
@@ -1909,17 +1864,13 @@
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.
@@ -1955,13 +1906,10 @@
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;
@@ -2021,13 +1969,10 @@
}
error = ud_putpages(vp, off, len, flags, cr);
out:
-#ifdef __lock_lint
- rw_exit(&ip->i_contents);
-#endif
return (error);
}
/* ARGSUSED */
static int32_t
@@ -2185,14 +2130,11 @@
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 */
@@ -2227,17 +2169,13 @@
*/
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.
*/
@@ -2337,17 +2275,14 @@
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);
}
@@ -2680,27 +2615,19 @@
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) {
/*
@@ -2761,17 +2688,13 @@
*/
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
@@ -3053,15 +2976,13 @@
}
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);
@@ -3089,15 +3010,13 @@
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.
*