--- linux-2.4.20-ext3merge/fs/buffer.c.=K0014=.orig 2002-11-28 23:53:15.000000000 +0000 +++ linux-2.4.20-ext3merge/fs/buffer.c 2002-12-02 15:58:29.000000000 +0000 @@ -2964,6 +2964,30 @@ } } + +/* + * Do some IO post-processing here!!! + */ +void do_io_postprocessing(void) +{ + int i; + struct buffer_head *bh, *next; + + spin_lock(&lru_list_lock); + bh = lru_list[BUF_LOCKED]; + if (bh) { + for (i = nr_buffers_type[BUF_LOCKED]; i-- > 0; bh = next) { + next = bh->b_next_free; + + if (!buffer_locked(bh)) + __refile_buffer(bh); + else + break; + } + } + spin_unlock(&lru_list_lock); +} + /* * This is the kernel update daemon. It was used to live in userspace * but since it's need to run safely we want it unkillable by mistake. @@ -3015,6 +3039,7 @@ #ifdef DEBUG printk(KERN_DEBUG "kupdate() activated...\n"); #endif + do_io_postprocessing(); sync_old_buffers(); run_task_queue(&tq_disk); }