diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index fcf3b3a42f58..5ed41de2ae1f 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -232,6 +232,7 @@ devfs_allocv(struct devfs_dirent *de, struct mount *mp, struct vnode **vpp, stru VI_LOCK(vp); dev_lock(); dev_refl(dev); + /* XXX: v_rdev should be protect by vnode lock */ vp->v_rdev = dev; KASSERT(vp->v_usecount == 1, ("%s %d (%d)\n", __func__, __LINE__, vp->v_usecount)); diff --git a/sys/fs/fifofs/fifo_vnops.c b/sys/fs/fifofs/fifo_vnops.c index 71615914249c..2d3254f968dd 100644 --- a/sys/fs/fifofs/fifo_vnops.c +++ b/sys/fs/fifofs/fifo_vnops.c @@ -179,7 +179,7 @@ fifo_open(ap) struct socket *rso, *wso; int error; - ASSERT_VOP_LOCKED(vp, "fifo_open"); + ASSERT_VOP_ELOCKED(vp, "fifo_open"); if (fp == NULL) return (EINVAL); if ((fip = vp->v_fifoinfo) == NULL) { diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 9acb596a1708..682496e2cb63 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -463,7 +463,7 @@ uipc_bind(struct socket *so, struct sockaddr *nam, struct thread *td) goto error; } vp = nd.ni_vp; - ASSERT_VOP_LOCKED(vp, "uipc_bind"); + ASSERT_VOP_ELOCKED(vp, "uipc_bind"); soun = (struct sockaddr_un *)sodupsockaddr(nam, M_WAITOK); UNP_GLOBAL_WLOCK(); diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 019553d3dd1a..4f5305e6b06f 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -184,7 +184,7 @@ vn_open_cred(ndp, flagp, cmode, cred, fp) ndp->ni_cnd.cn_nameiop = LOOKUP; ndp->ni_cnd.cn_flags = ISOPEN | ((fmode & O_NOFOLLOW) ? NOFOLLOW : FOLLOW) | - LOCKSHARED | LOCKLEAF | MPSAFE | AUDITVNODE1; + LOCKLEAF | MPSAFE | AUDITVNODE1; if ((error = namei(ndp)) != 0) return (error); if (!mpsafe) @@ -235,7 +235,7 @@ vn_open_cred(ndp, flagp, cmode, cred, fp) if (fmode & FWRITE) vp->v_writecount++; *flagp = fmode; - ASSERT_VOP_LOCKED(vp, "vn_open_cred"); + ASSERT_VOP_ELOCKED(vp, "vn_open_cred"); if (!mpsafe) VFS_UNLOCK_GIANT(vfslocked); return (0); diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index a4cadf74123c..67164e8918f1 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -151,7 +151,7 @@ vnode_destroy_vobject(struct vnode *vp) obj = vp->v_object; if (obj == NULL) return; - ASSERT_VOP_LOCKED(vp, "vnode_destroy_vobject"); + ASSERT_VOP_ELOCKED(vp, "vnode_destroy_vobject"); VM_OBJECT_LOCK(obj); if (obj->ref_count == 0) { /* @@ -198,7 +198,7 @@ vnode_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot, vp = (struct vnode *) handle; - ASSERT_VOP_LOCKED(vp, "vnode_pager_alloc"); + ASSERT_VOP_ELOCKED(vp, "vnode_pager_alloc"); /* * If the object is being terminated, wait for it to @@ -256,7 +256,7 @@ vnode_pager_dealloc(object) vm_object_clear_flag(object, OBJ_DISCONNECTWNT); wakeup(object); } - ASSERT_VOP_LOCKED(vp, "vnode_pager_dealloc"); + ASSERT_VOP_ELOCKED(vp, "vnode_pager_dealloc"); vp->v_object = NULL; vp->v_vflag &= ~VV_TEXT; }