* The CCD device does not populate bp->b_xio.xio_npages or xio_pages[].
A quirk in the xio test in vn_cache_strategy() could result in a null
pointer dereference panic.
* Fix the test to avoid the panic. Note that swapcache does not currently
work well with the CCD device for stripe-crossing I/Os due to the way
CCD breaks the I/O up. It should no longer panic, though.
/*
* If we are good then issue the I/O using swap_pager_strategy().
+ *
+ * We can only do this if the buffer actually supports object-backed
+ * I/O. If it doesn't npages will be 0.
*/
- if (i == bp->b_xio.xio_npages) {
+ if (i && i == bp->b_xio.xio_npages) {
m = bp->b_xio.xio_pages[0];
nbio = push_bio(bio);
nbio->bio_done = vn_cache_strategy_callback;