Author: marcel Date: Tue Feb 3 07:07:13 2009 New Revision: 188054 URL: http://svn.freebsd.org/changeset/base/188054
Log: In g_handleattr(), set bp->bio_completed also for the case where len is 0. Otherwise g_getattr() will never succeed when it is handled by g_handleattr_str(). Modified: head/sys/geom/geom_subr.c Modified: head/sys/geom/geom_subr.c ============================================================================== --- head/sys/geom/geom_subr.c Tue Feb 3 07:04:10 2009 (r188053) +++ head/sys/geom/geom_subr.c Tue Feb 3 07:07:13 2009 (r188054) @@ -882,12 +882,13 @@ g_handleattr(struct bio *bp, const char } } else if (bp->bio_length == len) { bcopy(val, bp->bio_data, len); - bp->bio_completed = len; } else { printf("%s: %s bio_length %jd len %d -> EFAULT\n", __func__, bp->bio_to->name, (intmax_t)bp->bio_length, len); error = EFAULT; } + if (error == 0) + bp->bio_completed = bp->bio_length; g_io_deliver(bp, error); return (1); } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"