diff options
-rw-r--r-- | sys/kern/vfs_vnops.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 718d4e0..5c92ba8 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -1080,6 +1080,8 @@ vn_extattr_get(struct vnode *vp, int ioflg, int attrnamespace, if ((ioflg & IO_NODELOCKED) == 0) vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); + ASSERT_VOP_LOCKED(vp, "IO_NODELOCKED with no vp lock held"); + /* authorize attribute retrieval as kernel */ error = VOP_GETEXTATTR(vp, attrnamespace, attrname, &auio, NULL, NULL, td); @@ -1123,6 +1125,8 @@ vn_extattr_set(struct vnode *vp, int ioflg, int attrnamespace, vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); } + ASSERT_VOP_LOCKED(vp, "IO_NODELOCKED with no vp lock held"); + /* authorize attribute setting as kernel */ error = VOP_SETEXTATTR(vp, attrnamespace, attrname, &auio, NULL, td); @@ -1147,6 +1151,8 @@ vn_extattr_rm(struct vnode *vp, int ioflg, int attrnamespace, vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); } + ASSERT_VOP_LOCKED(vp, "IO_NODELOCKED with no vp lock held"); + /* authorize attribute removal as kernel */ error = VOP_DELETEEXTATTR(vp, attrnamespace, attrname, NULL, td); if (error == EOPNOTSUPP) |