summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2002-04-29 20:00:39 +0000
committerrwatson <rwatson@FreeBSD.org>2002-04-29 20:00:39 +0000
commit5ca05f16425b5348ae007ca7290d3fcbb5c8ccd3 (patch)
tree30311592cff55cafa55d2c8de100bd42c1b01f98 /sys
parent93a5d21ef3abd6703f01cd7acb5306622979fa0b (diff)
downloadFreeBSD-src-5ca05f16425b5348ae007ca7290d3fcbb5c8ccd3.zip
FreeBSD-src-5ca05f16425b5348ae007ca7290d3fcbb5c8ccd3.tar.gz
Use vnode locking with devfs; permit VFS locking assertions to make
sense for devfs vnodes, and reduce/remove potential races in the devfs code. Submitted by: iadowse Approved by: phk
Diffstat (limited to 'sys')
-rw-r--r--sys/fs/devfs/devfs_vnops.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c
index d5bd3ea..39857a9 100644
--- a/sys/fs/devfs/devfs_vnops.c
+++ b/sys/fs/devfs/devfs_vnops.c
@@ -804,6 +804,8 @@ static struct vnodeopv_entry_desc devfs_vnodeop_entries[] = {
{ &vop_default_desc, (vop_t *) vop_defaultop },
{ &vop_access_desc, (vop_t *) devfs_access },
{ &vop_getattr_desc, (vop_t *) devfs_getattr },
+ { &vop_islocked_desc, (vop_t *) vop_stdislocked },
+ { &vop_lock_desc, (vop_t *) vop_stdlock },
{ &vop_lookup_desc, (vop_t *) devfs_lookup },
{ &vop_mknod_desc, (vop_t *) devfs_mknod },
{ &vop_pathconf_desc, (vop_t *) devfs_pathconf },
@@ -816,6 +818,7 @@ static struct vnodeopv_entry_desc devfs_vnodeop_entries[] = {
{ &vop_revoke_desc, (vop_t *) devfs_revoke },
{ &vop_setattr_desc, (vop_t *) devfs_setattr },
{ &vop_symlink_desc, (vop_t *) devfs_symlink },
+ { &vop_unlock_desc, (vop_t *) vop_stdunlock },
{ NULL, NULL }
};
static struct vnodeopv_desc devfs_vnodeop_opv_desc =
@@ -828,11 +831,14 @@ static struct vnodeopv_entry_desc devfs_specop_entries[] = {
{ &vop_default_desc, (vop_t *) spec_vnoperate },
{ &vop_access_desc, (vop_t *) devfs_access },
{ &vop_getattr_desc, (vop_t *) devfs_getattr },
+ { &vop_islocked_desc, (vop_t *) vop_stdislocked },
+ { &vop_lock_desc, (vop_t *) vop_stdlock },
{ &vop_print_desc, (vop_t *) devfs_print },
{ &vop_reclaim_desc, (vop_t *) devfs_reclaim },
{ &vop_remove_desc, (vop_t *) devfs_remove },
{ &vop_revoke_desc, (vop_t *) devfs_revoke },
{ &vop_setattr_desc, (vop_t *) devfs_setattr },
+ { &vop_unlock_desc, (vop_t *) vop_stdunlock },
{ NULL, NULL }
};
static struct vnodeopv_desc devfs_specop_opv_desc =
OpenPOWER on IntegriCloud