--- linux.linus/fs/buffer.c Wed Jan 3 23:45:26 2001 +++ linux/fs/buffer.c Wed Jan 10 15:49:36 2001 @@ -1145,13 +1145,15 @@ * free list if it can.. We can NOT free the buffer if: * - there are other users of it * - it is locked and thus can have active IO + * - it is marked BH_Protected */ void __bforget(struct buffer_head * buf) { /* grab the lru lock here to block bdflush. */ spin_lock(&lru_list_lock); write_lock(&hash_table_lock); - if (!atomic_dec_and_test(&buf->b_count) || buffer_locked(buf)) + if (!atomic_dec_and_test(&buf->b_count) || buffer_locked(buf) || + buffer_protected(buf)) goto in_use; __hash_unlink(buf); remove_inode_queue(buf);