From 8eb347d8b8feb1d01d11797ef9aca05dae2158b4 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sat, 21 Aug 2010 14:14:16 -0700 Subject: [PATCH] kernel - clarify comment in nestio code * Clarify comments on the use of a counter to determine when the last nested I/O is finished. --- sys/kern/vfs_bio.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 0bb9198077..193dc201f4 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -4574,9 +4574,8 @@ nestiobuf_done(struct bio *mbio, int donebytes, int error) } /* - * Decrement the master buf b_resid according to our donebytes, and - * also check if this is the last missing bit for the whole nestio - * mess to complete. If so, call biodone() on the master buf mbp. + * Decrement the operations in progress counter and terminate the + * I/O if this was the last bit. */ if (atomic_fetchadd_int((int *)&mbio->bio_driver_info, -1) == 1) { mbp->b_resid = 0; @@ -4606,9 +4605,8 @@ nestiobuf_start(struct bio *mbio) struct buf *mbp = mbio->bio_buf; /* - * Decrement the master buf b_resid according to our donebytes, and - * also check if this is the last missing bit for the whole nestio - * mess to complete. If so, call biodone() on the master buf mbp. + * Decrement the operations in progress counter and terminate the + * I/O if this was the last bit. */ if (atomic_fetchadd_int((int *)&mbio->bio_driver_info, -1) == 1) { if (mbp->b_flags & B_ERROR) -- 2.41.0