mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-22 09:43:47 +00:00
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
This commit is contained in:
parent
1923f73990
commit
d1b534dfc6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=93707
|
@ -1338,11 +1338,8 @@ brelse(struct buf * bp)
|
||||||
* If B_INVAL, clear B_DELWRI. We've already placed the buffer
|
* If B_INVAL, clear B_DELWRI. We've already placed the buffer
|
||||||
* on the correct queue.
|
* on the correct queue.
|
||||||
*/
|
*/
|
||||||
if ((bp->b_flags & (B_INVAL|B_DELWRI)) == (B_INVAL|B_DELWRI)) {
|
if ((bp->b_flags & (B_INVAL|B_DELWRI)) == (B_INVAL|B_DELWRI))
|
||||||
bp->b_flags &= ~B_DELWRI;
|
bundirty(bp);
|
||||||
--numdirtybuffers;
|
|
||||||
numdirtywakeup(lodirtybuffers);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fixup numfreebuffers count. The bp is on an appropriate queue
|
* Fixup numfreebuffers count. The bp is on an appropriate queue
|
||||||
|
|
Loading…
Reference in a new issue