summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-09-24 05:55:03 +0000
committerphk <phk@FreeBSD.org>2004-09-24 05:55:03 +0000
commit18b8697aaa9c690189ce7b34da033b07dc788812 (patch)
treec1e861bcbb145b90e5fb74cc813557b766cd6235
parent7ede6d888ce643e68a37e09f8499ef2555a38c4e (diff)
downloadFreeBSD-src-18b8697aaa9c690189ce7b34da033b07dc788812.zip
FreeBSD-src-18b8697aaa9c690189ce7b34da033b07dc788812.tar.gz
use dev_re[fl]thread() rather than home rolled versions.
-rw-r--r--sys/kern/vfs_bio.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 853803c..5d4f170 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -3108,11 +3108,7 @@ dev_strategy(struct buf *bp)
KASSERT(dev->si_refcount > 0,
("dev_strategy on un-referenced struct cdev *(%s)",
devtoname(dev)));
- dev_lock();
- csw = devsw(dev);
- if (csw != NULL)
- dev->si_threadcount++;
- dev_unlock();
+ csw = dev_refthread(dev);
if (csw == NULL) {
bp->b_error = ENXIO;
bp->b_ioflags = BIO_ERROR;
@@ -3122,9 +3118,7 @@ dev_strategy(struct buf *bp)
return;
}
(*csw->d_strategy)(&bp->b_io);
- dev_lock();
- dev->si_threadcount--;
- dev_unlock();
+ dev_relthread(dev);
}
/*
OpenPOWER on IntegriCloud