diff options
author | alc <alc@FreeBSD.org> | 2005-07-20 19:06:06 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2005-07-20 19:06:06 +0000 |
commit | 38bf328ab8a834dd02cd82fbbcbad6bb38ceced7 (patch) | |
tree | ac042e48ee290e496b46cceab5406a4b3b003617 /sys/vm/swap_pager.c | |
parent | 2854e6f54b01a61a10bb3567622c2db3b6756879 (diff) | |
download | FreeBSD-src-38bf328ab8a834dd02cd82fbbcbad6bb38ceced7.zip FreeBSD-src-38bf328ab8a834dd02cd82fbbcbad6bb38ceced7.tar.gz |
Eliminate inconsistency in the setting of the B_DONE flag. Specifically,
make the b_iodone callback responsible for setting it if it is needed.
Previously, it was set unconditionally by bufdone() without holding
whichever lock is shared by the b_iodone callback and the corresponding
top-half function. Consequently, in a race, the top-half function could
conclude that operation was done before the b_iodone callback finished.
See, for example, aio_physwakeup() and aio_fphysio().
Note: I don't believe that the other, more widely-used b_iodone callbacks
are affected.
Discussed with: jeff
Reviewed by: phk
MFC after: 2 weeks
Diffstat (limited to 'sys/vm/swap_pager.c')
-rw-r--r-- | sys/vm/swap_pager.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index b246aed..dc23576 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -1363,8 +1363,6 @@ swp_pager_async_iodone(struct buf *bp) int i; vm_object_t object = NULL; - bp->b_flags |= B_DONE; - /* * report error */ |