diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2020-12-25 12:59:54 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2020-12-25 12:59:54 +0000 |
commit | 0ddae2e43bde351e699797b713fdfd0c4d71688b (patch) | |
tree | 5c305222f703a8c48618339303894fe5bf0e271e /sys/msdosfs/msdosfs_vnops.c | |
parent | d5d6ba970dd241df83e52a3f686a5b3c47e2b215 (diff) |
Refactor klist insertion and removal
Rename klist_{insert,remove}() to klist_{insert,remove}_locked().
These functions assume that the caller has locked the klist. The current
state of locking remains intact because the kernel lock is still used
with all klists.
Add new functions klist_insert() and klist_remove() that lock the klist
internally. This allows some code simplification.
OK mpi@
Diffstat (limited to 'sys/msdosfs/msdosfs_vnops.c')
-rw-r--r-- | sys/msdosfs/msdosfs_vnops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c index d86b02995a8..142db65b719 100644 --- a/sys/msdosfs/msdosfs_vnops.c +++ b/sys/msdosfs/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_vnops.c,v 1.134 2020/06/11 09:18:43 mpi Exp $ */ +/* $OpenBSD: msdosfs_vnops.c,v 1.135 2020/12/25 12:59:52 visa Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.63 1997/10/17 11:24:19 ws Exp $ */ /*- @@ -1980,7 +1980,7 @@ msdosfs_kqfilter(void *v) kn->kn_hook = (caddr_t)vp; - klist_insert(&vp->v_selectinfo.si_note, kn); + klist_insert_locked(&vp->v_selectinfo.si_note, kn); return (0); } @@ -1990,7 +1990,7 @@ filt_msdosfsdetach(struct knote *kn) { struct vnode *vp = (struct vnode *)kn->kn_hook; - klist_remove(&vp->v_selectinfo.si_note, kn); + klist_remove_locked(&vp->v_selectinfo.si_note, kn); } int |