diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2007-05-17 23:46:29 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2007-05-17 23:46:29 +0000 |
commit | bab5a3a3bd1d0c7e027ee29dd3707999c71d5ccc (patch) | |
tree | 9e94a4344c63ea179e3dcd2858b220bba541324c | |
parent | 196e13b3652ba89bcfb5f6b17cf2759d61c3ec56 (diff) |
Collapse struct v_selectinfo in struct vnode, remove the
simplelock and reuse the name for the selinfo member.
Clean-up accordingly.
ok tedu@,art@
-rw-r--r-- | sys/kern/vfs_subr.c | 4 | ||||
-rw-r--r-- | sys/nfs/nfs_kq.c | 11 | ||||
-rw-r--r-- | sys/sys/vnode.h | 9 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_vnops.c | 11 |
4 files changed, 10 insertions, 25 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index d833e4e74e6..a63e28927d9 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.145 2007/05/09 01:09:16 deraadt Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.146 2007/05/17 23:46:28 thib Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -998,9 +998,7 @@ vclean(struct vnode *vp, int flags, struct proc *p) * Done with purge, notify sleepers of the grim news. */ vp->v_op = dead_vnodeop_p; - simple_lock(&vp->v_selectinfo.vsi_lock); VN_KNOTE(vp, NOTE_REVOKE); - simple_unlock(&vp->v_selectinfo.vsi_lock); vp->v_tag = VT_NON; vp->v_flag &= ~VXLOCK; #ifdef VFSDEBUG diff --git a/sys/nfs/nfs_kq.c b/sys/nfs/nfs_kq.c index 23e72b4576a..5a8628ea6b9 100644 --- a/sys/nfs/nfs_kq.c +++ b/sys/nfs/nfs_kq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_kq.c,v 1.4 2007/04/19 14:46:44 thib Exp $ */ +/* $OpenBSD: nfs_kq.c,v 1.5 2007/05/17 23:46:28 thib Exp $ */ /* $NetBSD: nfs_kq.c,v 1.7 2003/10/30 01:43:10 simonb Exp $ */ /*- @@ -193,10 +193,7 @@ filt_nfsdetach(struct knote *kn) SLIST_REMOVE(&vp->v_klist, kn, knote, kn_selnext); #endif - simple_lock(&vp->v_selectinfo.vsi_lock); - SLIST_REMOVE(&vp->v_selectinfo.vsi_selinfo.si_note, - kn, knote, kn_selnext); - simple_unlock(&vp->v_selectinfo.vsi_lock); + SLIST_REMOVE(&vp->v_selectinfo.si_note, kn, knote, kn_selnext); /* Remove the vnode from watch list */ rw_enter_write(&nfskevq_lock); @@ -344,9 +341,7 @@ nfs_kqfilter(void *v) /* kick the poller */ wakeup(pnfskq); - simple_lock(&vp->v_selectinfo.vsi_lock); - SLIST_INSERT_HEAD(&vp->v_selectinfo.vsi_selinfo.si_note, kn, kn_selnext); - simple_unlock(&vp->v_selectinfo.vsi_lock); + SLIST_INSERT_HEAD(&vp->v_selectinfo.si_note, kn, kn_selnext); #ifdef notyet /* XXXLUKEM lock the struct? */ diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index ff9acf4218c..ece8bc15e30 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vnode.h,v 1.79 2007/05/05 12:03:04 art Exp $ */ +/* $OpenBSD: vnode.h,v 1.80 2007/05/17 23:46:28 thib Exp $ */ /* $NetBSD: vnode.h,v 1.38 1996/02/29 20:59:05 cgd Exp $ */ /* @@ -107,10 +107,7 @@ struct vnode { enum vtagtype v_tag; /* type of underlying data */ void *v_data; /* private data for fs */ - struct { - struct simplelock vsi_lock; /* lock to protect below */ - struct selinfo vsi_selinfo; /* identity of poller(s) */ - } v_selectinfo; + struct selinfo v_selectinfo; /* identity of poller(s) */ }; #define v_mountedhere v_un.vu_mountedhere #define v_socket v_un.vu_socket @@ -252,7 +249,7 @@ vref(vp) #define NULLVP ((struct vnode *)NULL) #define VN_KNOTE(vp, b) \ - KNOTE(&vp->v_selectinfo.vsi_selinfo.si_note, (b)) + KNOTE(&vp->v_selectinfo.si_note, (b)) /* * Global vnode data. diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index e71c59f15d4..d28a0ce43a9 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.79 2007/05/09 17:04:22 deraadt Exp $ */ +/* $OpenBSD: ufs_vnops.c,v 1.80 2007/05/17 23:46:28 thib Exp $ */ /* $NetBSD: ufs_vnops.c,v 1.18 1996/05/11 18:28:04 mycroft Exp $ */ /* @@ -2089,9 +2089,7 @@ ufs_kqfilter(void *v) kn->kn_hook = (caddr_t)vp; - simple_lock(&vp->v_selectinfo.vsi_lock); - SLIST_INSERT_HEAD(&vp->v_selectinfo.vsi_selinfo.si_note, kn, kn_selnext); - simple_unlock(&vp->v_selectinfo.vsi_lock); + SLIST_INSERT_HEAD(&vp->v_selectinfo.si_note, kn, kn_selnext); return (0); } @@ -2101,10 +2099,7 @@ filt_ufsdetach(struct knote *kn) { struct vnode *vp = (struct vnode *)kn->kn_hook; - simple_lock(&vp->v_selectinfo.vsi_lock); - SLIST_REMOVE(&vp->v_selectinfo.vsi_selinfo.si_note, - kn, knote, kn_selnext); - simple_unlock(&vp->v_selectinfo.vsi_lock); + SLIST_REMOVE(&vp->v_selectinfo.si_note, kn, knote, kn_selnext); } /*ARGSUSED*/ |