diff options
author | phk <phk@FreeBSD.org> | 2004-02-21 21:10:55 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-02-21 21:10:55 +0000 |
commit | ad925439e08646e188eb1c0e0be355f0685c8739 (patch) | |
tree | 0896a7d99c90ad922a1e4b41f052d155256cb97e /sys/fs | |
parent | d68e8ba04cb070f349043edccaafae5facffab48 (diff) | |
download | FreeBSD-src-ad925439e08646e188eb1c0e0be355f0685c8739.zip FreeBSD-src-ad925439e08646e188eb1c0e0be355f0685c8739.tar.gz |
Device megapatch 4/6:
Introduce d_version field in struct cdevsw, this must always be
initialized to D_VERSION.
Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing
four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/coda/coda_fbsd.c | 2 | ||||
-rw-r--r-- | sys/fs/specfs/spec_vnops.c | 16 |
2 files changed, 10 insertions, 8 deletions
diff --git a/sys/fs/coda/coda_fbsd.c b/sys/fs/coda/coda_fbsd.c index 1c061b1..9dc260c 100644 --- a/sys/fs/coda/coda_fbsd.c +++ b/sys/fs/coda/coda_fbsd.c @@ -66,6 +66,8 @@ __FBSDID("$FreeBSD$"); #define VC_DEV_NO 93 static struct cdevsw codadevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = vc_nb_open, .d_close = vc_nb_close, .d_read = vc_nb_read, diff --git a/sys/fs/specfs/spec_vnops.c b/sys/fs/specfs/spec_vnops.c index 31d9bfe..4682b5d 100644 --- a/sys/fs/specfs/spec_vnops.c +++ b/sys/fs/specfs/spec_vnops.c @@ -194,7 +194,7 @@ spec_open(ap) vp->v_vflag |= VV_ISTTY; VOP_UNLOCK(vp, 0, td); - if(dsw->d_flags & D_NOGIANT) { + if(!(dsw->d_flags & D_NEEDGIANT)) { DROP_GIANT(); if (dsw->d_fdopen != NULL) error = dsw->d_fdopen(dev, ap->a_mode, td, ap->a_fdidx); @@ -267,7 +267,7 @@ spec_read(ap) dsw = devsw(dev); VOP_UNLOCK(vp, 0, td); - if (dsw->d_flags & D_NOGIANT) { + if (!(dsw->d_flags & D_NEEDGIANT)) { DROP_GIANT(); error = dsw->d_read(dev, uio, ap->a_ioflag); PICKUP_GIANT(); @@ -307,7 +307,7 @@ spec_write(ap) resid = uio->uio_resid; VOP_UNLOCK(vp, 0, td); - if (dsw->d_flags & D_NOGIANT) { + if (!(dsw->d_flags & D_NEEDGIANT)) { DROP_GIANT(); error = dsw->d_write(dev, uio, ap->a_ioflag); PICKUP_GIANT(); @@ -342,7 +342,7 @@ spec_ioctl(ap) dev = ap->a_vp->v_rdev; dsw = devsw(dev); - if (dsw->d_flags & D_NOGIANT) { + if (!(dsw->d_flags & D_NEEDGIANT)) { DROP_GIANT(); error = dsw->d_ioctl(dev, ap->a_command, ap->a_data, ap->a_fflag, ap->a_td); @@ -371,7 +371,7 @@ spec_poll(ap) dev = ap->a_vp->v_rdev; dsw = devsw(dev); - if (dsw->d_flags & D_NOGIANT) { + if (!(dsw->d_flags & D_NEEDGIANT)) { DROP_GIANT(); error = dsw->d_poll(dev, ap->a_events, ap->a_td); PICKUP_GIANT(); @@ -394,7 +394,7 @@ spec_kqfilter(ap) dev = ap->a_vp->v_rdev; dsw = devsw(dev); - if (dsw->d_flags & D_NOGIANT) { + if (!(dsw->d_flags & D_NEEDGIANT)) { DROP_GIANT(); error = dsw->d_kqfilter(dev, ap->a_kn); PICKUP_GIANT(); @@ -509,7 +509,7 @@ spec_xstrategy(struct vnode *vp, struct buf *bp) ("No strategy on dev %s responsible for buffer %p\n", devtoname(bp->b_dev), bp)); - if (dsw->d_flags & D_NOGIANT) { + if (!(dsw->d_flags & D_NEEDGIANT)) { /* XXX: notyet DROP_GIANT(); */ DEV_STRATEGY(bp); /* XXX: notyet PICKUP_GIANT(); */ @@ -631,7 +631,7 @@ spec_close(ap) return (0); } VI_UNLOCK(vp); - if (dsw->d_flags & D_NOGIANT) { + if (!(dsw->d_flags & D_NEEDGIANT)) { DROP_GIANT(); error = dsw->d_close(dev, ap->a_fflag, S_IFCHR, td); PICKUP_GIANT(); |