diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index b7c4d6005778..e72f5e44bf52 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -3678,7 +3678,7 @@ bufdonebio(struct bio *bip) struct buf *bp; bp = bip->bio_caller2; - bp->b_resid = bp->b_bcount - bip->bio_completed; + bp->b_resid = bip->bio_resid; bp->b_ioflags = bip->bio_flags; bp->b_error = bip->bio_error; if (bp->b_error)