mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-10 08:22:27 +01:00
`numdirtybuffers' was not maintained properly. This caused excessive
flushing of buffers in an attempt to reduce numdirtybuffers, and perhaps other problems.
This commit is contained in:
parent
44a8636f2a
commit
dab8d6e4e7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=30204
@ -53,8 +53,10 @@
|
||||
*/
|
||||
void mark_buffer_dirty(struct buf *bh)
|
||||
{
|
||||
numdirtybuffers++;
|
||||
bh->b_flags |= B_DELWRI;
|
||||
if (!(bh->b_flags & B_DELWRI)) {
|
||||
numdirtybuffers++;
|
||||
bh->b_flags |= B_DELWRI;
|
||||
}
|
||||
bh->b_flags &= ~(B_READ | B_ERROR);
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,10 @@
|
||||
*/
|
||||
void mark_buffer_dirty(struct buf *bh)
|
||||
{
|
||||
numdirtybuffers++;
|
||||
bh->b_flags |= B_DELWRI;
|
||||
if (!(bh->b_flags & B_DELWRI)) {
|
||||
numdirtybuffers++;
|
||||
bh->b_flags |= B_DELWRI;
|
||||
}
|
||||
bh->b_flags &= ~(B_READ | B_ERROR);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user