1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-11 09:50:12 +00:00

Add a couple of strategic KASSERTs

This commit is contained in:
Poul-Henning Kamp 1999-10-08 19:07:23 +00:00
parent 90fce79ecd
commit 1201869007
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=52034
2 changed files with 12 additions and 0 deletions

View File

@ -677,6 +677,12 @@ spec_strategy(ap)
if (((bp->b_flags & B_READ) == 0) &&
(LIST_FIRST(&bp->b_dep)) != NULL && bioops.io_start)
(*bioops.io_start)(bp);
KASSERT(devsw(bp->b_dev) != NULL,
("No devsw on dev %s responsible for buffer %p\n",
devtoname(bp->b_dev), bp));
KASSERT(devsw(bp->b_dev)->d_strategy != NULL,
("No strategy on dev %s responsible for buffer %p\n",
devtoname(bp->b_dev), bp));
BUF_STRATEGY(bp, 0);
return (0);
}

View File

@ -677,6 +677,12 @@ spec_strategy(ap)
if (((bp->b_flags & B_READ) == 0) &&
(LIST_FIRST(&bp->b_dep)) != NULL && bioops.io_start)
(*bioops.io_start)(bp);
KASSERT(devsw(bp->b_dev) != NULL,
("No devsw on dev %s responsible for buffer %p\n",
devtoname(bp->b_dev), bp));
KASSERT(devsw(bp->b_dev)->d_strategy != NULL,
("No strategy on dev %s responsible for buffer %p\n",
devtoname(bp->b_dev), bp));
BUF_STRATEGY(bp, 0);
return (0);
}