aboutsummaryrefslogtreecommitdiff
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, 6 insertions, 0 deletions
diff --git a/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c b/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c
index c20770bc733b..c93c20e6cd98 100644
--- a/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c
+++ b/sys/gnu/fs/ext2fs/ext2_linux_ialloc.c
@@ -53,6 +53,7 @@
*/
void mark_buffer_dirty(struct buf *bh)
{
+ numdirtybuffers++;
bh->b_flags |= B_DELWRI;
bh->b_flags &= ~(B_READ | B_ERROR);
}
@@ -62,6 +63,11 @@ void mark_buffer_dirty(struct buf *bh)
*/
int ll_w_block(struct buf * bp, int waitfor)
{
+ if (bp->b_flags & B_DELWRI) {
+ --numdirtybuffers;
+ if (needsbuffer)
+ vfs_bio_need_satisfy();
+ }
bp->b_flags &= ~(B_READ|B_DONE|B_ERROR|B_DELWRI);
bp->b_flags |= B_WRITEINPROG;
bp->b_vp->v_numoutput++;