--- //depot/vendor/freebsd/src/sys/fs/nullfs/null_vfsops.c 2008/01/13 14:45:30 +++ //depot/user/attilio/attilio_schedlock/fs/nullfs/null_vfsops.c 2008/02/05 19:04:11 @@ -107,7 +107,7 @@ * (XXX) VOP_ISLOCKED is needed? */ if ((mp->mnt_vnodecovered->v_op == &null_vnodeops) && - VOP_ISLOCKED(mp->mnt_vnodecovered, NULL)) { + VOP_ISLOCKED(mp->mnt_vnodecovered, curthread)) { VOP_UNLOCK(mp->mnt_vnodecovered, 0); isvnunlocked = 1; } @@ -120,7 +120,7 @@ /* * Re-lock vnode. */ - if (isvnunlocked && !VOP_ISLOCKED(mp->mnt_vnodecovered, NULL)) + if (isvnunlocked && !VOP_ISLOCKED(mp->mnt_vnodecovered, curthread)) vn_lock(mp->mnt_vnodecovered, LK_EXCLUSIVE | LK_RETRY); if (error) @@ -247,7 +247,7 @@ VREF(vp); #ifdef NULLFS_DEBUG - if (VOP_ISLOCKED(vp, NULL)) + if (VOP_ISLOCKED(vp, curthread)) panic("root vnode is locked.\n"); #endif vn_lock(vp, flags | LK_RETRY); --- //depot/vendor/freebsd/src/sys/kern/kern_lock.c 2008/02/06 00:52:22 +++ //depot/user/attilio/attilio_schedlock/kern/kern_lock.c 2008/02/06 13:22:11 @@ -606,7 +606,7 @@ int lock_type = 0; int interlocked; - KASSERT(td == NULL || td == curthread, + KASSERT(td == curthread, ("%s: thread passed argument (%p) is not valid", __func__, td)); if (!kdb_active) { @@ -615,7 +615,7 @@ } else interlocked = 0; if (lkp->lk_exclusivecount != 0) { - if (td == NULL || lkp->lk_lockholder == td) + if (lkp->lk_lockholder == td) lock_type = LK_EXCLUSIVE; else lock_type = LK_EXCLOTHER; --- //depot/vendor/freebsd/src/sys/kern/vfs_subr.c 2008/01/24 12:35:50 +++ //depot/user/attilio/attilio_schedlock/kern/vfs_subr.c 2008/01/24 15:03:46 @@ -1638,7 +1638,7 @@ VFS_UNLOCK_GIANT(vfslocked); vfslocked = 0; } - if (VOP_ISLOCKED(vp, NULL) != 0) { + if (VOP_ISLOCKED(vp, curthread) != 0) { VFS_UNLOCK_GIANT(vfslocked); return (1); } @@ -2208,7 +2208,7 @@ */ v_decr_useonly(vp); vp->v_iflag |= VI_OWEINACT; - if (VOP_ISLOCKED(vp, NULL) != LK_EXCLUSIVE) { + if (VOP_ISLOCKED(vp, curthread) != LK_EXCLUSIVE) { error = VOP_LOCK(vp, LK_UPGRADE|LK_INTERLOCK|LK_NOWAIT); VI_LOCK(vp); if (error) { @@ -2684,7 +2684,8 @@ for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) { nmp = TAILQ_NEXT(mp, mnt_list); TAILQ_FOREACH(vp, &mp->mnt_nvnodelist, v_nmntvnodes) { - if (vp->v_type != VMARKER && VOP_ISLOCKED(vp, NULL)) + if (vp->v_type != VMARKER && + VOP_ISLOCKED(vp, curthread)) vprint("", vp); } nmp = TAILQ_NEXT(mp, mnt_list); @@ -2971,7 +2972,7 @@ MNT_VNODE_FOREACH(vp, mp, mvp) { VI_LOCK(vp); if ((vp->v_iflag & VI_OBJDIRTY) && - (flags == MNT_WAIT || VOP_ISLOCKED(vp, NULL) == 0)) { + (flags == MNT_WAIT || VOP_ISLOCKED(vp, curthread) == 0)) { MNT_IUNLOCK(mp); if (!vget(vp, LK_EXCLUSIVE | LK_RETRY | LK_INTERLOCK, @@ -3478,7 +3479,7 @@ assert_vop_locked(struct vnode *vp, const char *str) { - if (vp && !IGNORE_LOCK(vp) && VOP_ISLOCKED(vp, NULL) == 0) + if (vp && !IGNORE_LOCK(vp) && VOP_ISLOCKED(vp, curthread) == 0) vfs_badlock("is not locked but should be", str, vp); } --- //depot/vendor/freebsd/src/sys/nfs4client/nfs4_vfsops.c 2008/01/13 14:45:30 +++ //depot/user/attilio/attilio_schedlock/nfs4client/nfs4_vfsops.c 2008/01/24 14:39:40 @@ -749,7 +749,7 @@ MNT_VNODE_FOREACH(vp, mp, mvp) { VI_LOCK(vp); MNT_IUNLOCK(mp); - if (VOP_ISLOCKED(vp, NULL) || + if (VOP_ISLOCKED(vp, curthread) || vp->v_bufobj.bo_dirty.bv_cnt == 0 || waitfor == MNT_LAZY) { VI_UNLOCK(vp); --- //depot/vendor/freebsd/src/sys/nfsclient/nfs_vfsops.c 2008/01/13 14:45:30 +++ //depot/user/attilio/attilio_schedlock/nfsclient/nfs_vfsops.c 2008/01/24 14:39:40 @@ -1050,7 +1050,7 @@ MNT_VNODE_FOREACH(vp, mp, mvp) { VI_LOCK(vp); MNT_IUNLOCK(mp); - if (VOP_ISLOCKED(vp, NULL) || + if (VOP_ISLOCKED(vp, curthread) || vp->v_bufobj.bo_dirty.bv_cnt == 0 || waitfor == MNT_LAZY) { VI_UNLOCK(vp);