diff options
author | dillon <dillon@FreeBSD.org> | 2002-04-03 00:17:36 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 2002-04-03 00:17:36 +0000 |
commit | 9a85737b15277c313ff96ba8a6decb009a81924d (patch) | |
tree | f0a34c601ccc117e90e140cded4a6126bceb1139 /sys/kern/vfs_bio.c | |
parent | aad01d8119fbe546c9fef66008eae583874245f8 (diff) | |
download | FreeBSD-src-9a85737b15277c313ff96ba8a6decb009a81924d.zip FreeBSD-src-9a85737b15277c313ff96ba8a6decb009a81924d.tar.gz |
brelse() was improperly clearing B_DELWRI in the B_DELWRI|B_INVAL case
without removing the buffer from the vnode's dirty buffer list, which
can result in a panic in NFS. Replaced the code with a call to bundirty()
which deals with it properly.
PR: kern/36108, kern/36174
Submitted by: various people
Special mention: to Danny Schales <dan@coes.LaTech.edu> for providing a core dump that helped me track this down.
MFC after: 1 day
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r-- | sys/kern/vfs_bio.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 2a56103..a81136a 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1338,11 +1338,8 @@ brelse(struct buf * bp) * If B_INVAL, clear B_DELWRI. We've already placed the buffer * on the correct queue. */ - if ((bp->b_flags & (B_INVAL|B_DELWRI)) == (B_INVAL|B_DELWRI)) { - bp->b_flags &= ~B_DELWRI; - --numdirtybuffers; - numdirtywakeup(lodirtybuffers); - } + if ((bp->b_flags & (B_INVAL|B_DELWRI)) == (B_INVAL|B_DELWRI)) + bundirty(bp); /* * Fixup numfreebuffers count. The bp is on an appropriate queue |