summaryrefslogtreecommitdiffstats
path: root/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-10-07 11:10:18 +0000
committerbde <bde@FreeBSD.org>1997-10-07 11:10:18 +0000
commit3d4ee35e7c0ed08bdeaad4c2a693cc6fa8b1132e (patch)
tree9af62aa7b92c0377e787983fad9e4edb6b2fa672 /sys/gnu/fs/ext2fs/ext2_linux_ialloc.c
parent429da88473c9e89ca73e9fc5f555c23ddbb0adc4 (diff)
downloadFreeBSD-src-3d4ee35e7c0ed08bdeaad4c2a693cc6fa8b1132e.zip
FreeBSD-src-3d4ee35e7c0ed08bdeaad4c2a693cc6fa8b1132e.tar.gz
`numdirtybuffers' was not maintained properly. This caused excessive
flushing of buffers in an attempt to reduce numdirtybuffers, and perhaps other problems.
Diffstat (limited to 'sys/gnu/fs/ext2fs/ext2_linux_ialloc.c')
-rw-r--r--sys/gnu/fs/ext2fs/ext2_linux_ialloc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c b/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c
index 9f2a967..2b964b2 100644
--- a/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c
+++ b/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c
@@ -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);
}
OpenPOWER on IntegriCloud