| 396 | } |
| 397 | |
| 398 | static void |
| 399 | giant_strategy(struct bio *bp) |
| 400 | { |
| 401 | struct cdevsw *dsw; |
| 402 | struct cdev *dev; |
| 403 | int ref; |
| 404 | |
| 405 | dev = bp->bio_dev; |
| 406 | dsw = dev_refthread(dev, &ref); |
| 407 | if (dsw == NULL) { |
| 408 | biofinish(bp, NULL, ENXIO); |
| 409 | return; |
| 410 | } |
| 411 | mtx_lock(&Giant); |
| 412 | dsw->d_gianttrick->d_strategy(bp); |
| 413 | mtx_unlock(&Giant); |
| 414 | dev_relthread(dev, ref); |
| 415 | } |
| 416 | |
| 417 | static int |
| 418 | giant_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td) |
nothing calls this directly
no test coverage detected