mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
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().
This commit is contained in:
parent
c897f076bd
commit
da3ee90988
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=188054
@ -882,12 +882,13 @@ g_handleattr(struct bio *bp, const char *attribute, const void *val, int len)
|
||||
}
|
||||
} 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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user