summaryrefslogtreecommitdiffstats
path: root/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c
diff options
context:
space:
mode:
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