From: mvs Date: Fri, 8 Sep 2023 20:00:27 +0000 (+0000) Subject: Remove the remnants of the leftover selinfo from vnode(9) layer. Just X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=cc53a24ce58eb2212822060db742650de2787ee4;p=openbsd Remove the remnants of the leftover selinfo from vnode(9) layer. Just mechanical 'selinfo' to 'klist' replacement in 'vnode' structure because knote(9) API is already used. headers added where is was required. ok bluhm --- diff --git a/sys/dev/hotplug.c b/sys/dev/hotplug.c index 7743db33592..1d33606df52 100644 --- a/sys/dev/hotplug.c +++ b/sys/dev/hotplug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hotplug.c,v 1.22 2022/07/02 08:50:41 visa Exp $ */ +/* $OpenBSD: hotplug.c,v 1.23 2023/09/08 20:00:27 mvs Exp $ */ /* * Copyright (c) 2004 Alexander Yurchenko * @@ -25,6 +25,7 @@ #include #include #include +#include #include #define HOTPLUG_MAXEVENTS 64 diff --git a/sys/dev/wscons/wseventvar.h b/sys/dev/wscons/wseventvar.h index fc1cc7da286..29ef66b27c5 100644 --- a/sys/dev/wscons/wseventvar.h +++ b/sys/dev/wscons/wseventvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wseventvar.h,v 1.11 2022/07/02 08:50:42 visa Exp $ */ +/* $OpenBSD: wseventvar.h,v 1.12 2023/09/08 20:00:28 mvs Exp $ */ /* $NetBSD: wseventvar.h,v 1.1 1998/03/22 14:24:03 drochner Exp $ */ /* @@ -71,6 +71,7 @@ * @(#)event_var.h 8.1 (Berkeley) 6/11/93 */ +#include #include /* diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c index 7f66460e460..3ac15e3a21e 100644 --- a/sys/isofs/cd9660/cd9660_vnops.c +++ b/sys/isofs/cd9660/cd9660_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_vnops.c,v 1.94 2023/03/08 04:43:08 guenther Exp $ */ +/* $OpenBSD: cd9660_vnops.c,v 1.95 2023/09/08 20:00:28 mvs Exp $ */ /* $NetBSD: cd9660_vnops.c,v 1.42 1997/10/16 23:56:57 christos Exp $ */ /*- @@ -961,7 +961,7 @@ cd9660_kqfilter(void *v) kn->kn_hook = (caddr_t)vp; - klist_insert_locked(&vp->v_selectinfo.si_note, kn); + klist_insert_locked(&vp->v_klist, kn); return (0); } @@ -971,7 +971,7 @@ filt_cd9660detach(struct knote *kn) { struct vnode *vp = (struct vnode *)kn->kn_hook; - klist_remove_locked(&vp->v_selectinfo.si_note, kn); + klist_remove_locked(&vp->v_klist, kn); } int diff --git a/sys/miscfs/fuse/fuse_device.c b/sys/miscfs/fuse/fuse_device.c index eaa6ad0c194..cd6c627b195 100644 --- a/sys/miscfs/fuse/fuse_device.c +++ b/sys/miscfs/fuse/fuse_device.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_device.c,v 1.38 2022/08/29 06:08:04 jsg Exp $ */ +/* $OpenBSD: fuse_device.c,v 1.39 2023/09/08 20:00:28 mvs Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon * @@ -25,6 +25,7 @@ #include #include #include +#include #include "fusefs_node.h" #include "fusefs.h" diff --git a/sys/miscfs/fuse/fuse_vnops.c b/sys/miscfs/fuse/fuse_vnops.c index 8f9a66f2c15..c3c06c8775d 100644 --- a/sys/miscfs/fuse/fuse_vnops.c +++ b/sys/miscfs/fuse/fuse_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_vnops.c,v 1.66 2022/06/26 05:20:42 visa Exp $ */ +/* $OpenBSD: fuse_vnops.c,v 1.67 2023/09/08 20:00:28 mvs Exp $ */ /* * Copyright (c) 2012-2013 Sylvestre Gallon * @@ -154,7 +154,7 @@ fusefs_kqfilter(void *v) kn->kn_hook = (caddr_t)vp; - klist_insert_locked(&vp->v_selectinfo.si_note, kn); + klist_insert_locked(&vp->v_klist, kn); return (0); } @@ -164,7 +164,7 @@ filt_fusefsdetach(struct knote *kn) { struct vnode *vp = (struct vnode *)kn->kn_hook; - klist_remove_locked(&vp->v_selectinfo.si_note, kn); + klist_remove_locked(&vp->v_klist, kn); } int diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c index 5be8a2051a3..12d22a95ce0 100644 --- a/sys/msdosfs/msdosfs_vnops.c +++ b/sys/msdosfs/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_vnops.c,v 1.139 2022/08/23 20:37:16 cheloha Exp $ */ +/* $OpenBSD: msdosfs_vnops.c,v 1.140 2023/09/08 20:00:28 mvs Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.63 1997/10/17 11:24:19 ws Exp $ */ /*- @@ -1970,7 +1970,7 @@ msdosfs_kqfilter(void *v) kn->kn_hook = (caddr_t)vp; - klist_insert_locked(&vp->v_selectinfo.si_note, kn); + klist_insert_locked(&vp->v_klist, kn); return (0); } @@ -1980,7 +1980,7 @@ filt_msdosfsdetach(struct knote *kn) { struct vnode *vp = (struct vnode *)kn->kn_hook; - klist_remove_locked(&vp->v_selectinfo.si_note, kn); + klist_remove_locked(&vp->v_klist, kn); } int diff --git a/sys/nfs/nfs_kq.c b/sys/nfs/nfs_kq.c index 999fed0a8e9..9ac86b51c57 100644 --- a/sys/nfs/nfs_kq.c +++ b/sys/nfs/nfs_kq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_kq.c,v 1.35 2023/03/08 04:43:09 guenther Exp $ */ +/* $OpenBSD: nfs_kq.c,v 1.36 2023/09/08 20:00:28 mvs Exp $ */ /* $NetBSD: nfs_kq.c,v 1.7 2003/10/30 01:43:10 simonb Exp $ */ /*- @@ -185,7 +185,7 @@ filt_nfsdetach(struct knote *kn) { struct vnode *vp = (struct vnode *)kn->kn_hook; - klist_remove_locked(&vp->v_selectinfo.si_note, kn); + klist_remove_locked(&vp->v_klist, kn); /* Remove the vnode from watch list */ if ((kn->kn_flags & (__EV_POLL | __EV_SELECT)) == 0) @@ -342,7 +342,7 @@ nfs_kqfilter(void *v) return (error); } - klist_insert_locked(&vp->v_selectinfo.si_note, kn); + klist_insert_locked(&vp->v_klist, kn); return (0); } diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 30787afddd8..994ceb6239f 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vnode.h,v 1.168 2023/02/10 14:34:17 visa Exp $ */ +/* $OpenBSD: vnode.h,v 1.169 2023/09/08 20:00:28 mvs Exp $ */ /* $NetBSD: vnode.h,v 1.38 1996/02/29 20:59:05 cgd Exp $ */ /* @@ -37,8 +37,8 @@ #include #include +#include #include -#include #include /* @@ -127,7 +127,7 @@ struct vnode { TAILQ_HEAD(, namecache) v_cache_dst; /* cache entries to us */ void *v_data; /* private data for fs */ - struct selinfo v_selectinfo; /* identity of poller(s) */ + struct klist v_klist; /* identity of poller(s) */ }; #define v_mountedhere v_un.vu_mountedhere #define v_socket v_un.vu_socket @@ -246,7 +246,7 @@ extern int vttoif_tab[]; #define VATTR_NULL(vap) vattr_null(vap) #define NULLVP ((struct vnode *)NULL) #define VN_KNOTE(vp, b) \ - knote_locked(&vp->v_selectinfo.si_note, (b)) + knote_locked(&vp->v_klist, (b)) /* * Global vnode data. diff --git a/sys/tmpfs/tmpfs_vnops.c b/sys/tmpfs/tmpfs_vnops.c index bc1390d72c9..d910b152362 100644 --- a/sys/tmpfs/tmpfs_vnops.c +++ b/sys/tmpfs/tmpfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tmpfs_vnops.c,v 1.52 2022/06/26 05:20:42 visa Exp $ */ +/* $OpenBSD: tmpfs_vnops.c,v 1.53 2023/09/08 20:00:28 mvs Exp $ */ /* $NetBSD: tmpfs_vnops.c,v 1.100 2012/11/05 17:27:39 dholland Exp $ */ /* @@ -2627,7 +2627,7 @@ tmpfs_kqfilter(void *v) kn->kn_hook = (caddr_t)vp; - klist_insert_locked(&vp->v_selectinfo.si_note, kn); + klist_insert_locked(&vp->v_klist, kn); return (0); } @@ -2637,7 +2637,7 @@ filt_tmpfsdetach(struct knote *kn) { struct vnode *vp = (struct vnode *)kn->kn_hook; - klist_remove_locked(&vp->v_selectinfo.si_note, kn); + klist_remove_locked(&vp->v_klist, kn); } int diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index a76d8940c50..6276475cda8 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_vnops.c,v 1.157 2023/03/08 04:43:09 guenther Exp $ */ +/* $OpenBSD: ufs_vnops.c,v 1.158 2023/09/08 20:00:28 mvs Exp $ */ /* $NetBSD: ufs_vnops.c,v 1.18 1996/05/11 18:28:04 mycroft Exp $ */ /* @@ -1921,7 +1921,7 @@ ufs_kqfilter(void *v) kn->kn_hook = (caddr_t)vp; - klist_insert_locked(&vp->v_selectinfo.si_note, kn); + klist_insert_locked(&vp->v_klist, kn); return (0); } @@ -1931,7 +1931,7 @@ filt_ufsdetach(struct knote *kn) { struct vnode *vp = (struct vnode *)kn->kn_hook; - klist_remove_locked(&vp->v_selectinfo.si_note, kn); + klist_remove_locked(&vp->v_klist, kn); } int