Add defensive assertion to vdev_queue_aggregate()

a6ccb36b94 had been intended to include
this to silence Coverity reports, but this one was missed by mistake.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14043
This commit is contained in:
Richard Yao 2022-10-17 12:37:31 -04:00 committed by Brian Behlendorf
parent d692e6c36e
commit 411d327c67
1 changed files with 1 additions and 0 deletions

View File

@ -725,6 +725,7 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio)
* after our span is mandatory. * after our span is mandatory.
*/ */
dio = AVL_NEXT(t, last); dio = AVL_NEXT(t, last);
ASSERT3P(dio, !=, NULL);
dio->io_flags &= ~ZIO_FLAG_OPTIONAL; dio->io_flags &= ~ZIO_FLAG_OPTIONAL;
} else { } else {
/* do not include the optional i/o */ /* do not include the optional i/o */