summaryrefslogtreecommitdiffstats
path: root/sys/ufs/ffs/ffs_vfsops.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2005-07-20 19:06:06 +0000
committeralc <alc@FreeBSD.org>2005-07-20 19:06:06 +0000
commit38bf328ab8a834dd02cd82fbbcbad6bb38ceced7 (patch)
treeac042e48ee290e496b46cceab5406a4b3b003617 /sys/ufs/ffs/ffs_vfsops.c
parent2854e6f54b01a61a10bb3567622c2db3b6756879 (diff)
downloadFreeBSD-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/ufs/ffs/ffs_vfsops.c')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index eeaf861..d80be58 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1534,7 +1534,7 @@ ffs_backgroundwritedone(struct buf *bp)
* by biodone it will be tossed.
*/
bp->b_flags |= B_NOCACHE;
- bp->b_flags &= ~(B_CACHE | B_DONE);
+ bp->b_flags &= ~B_CACHE;
bufdone(bp);
BO_LOCK(bufobj);
/*
OpenPOWER on IntegriCloud