Skip to contentSkip to conversation

-ac13 buffer.c MAJOR bug

DISCUSSION Stephen C. Tweedie 1 participant 1 message Jun 11, 2000 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Hi,

Quoted 2 lines · I Lee Hetherington

I am not seeing this BUG in ac12. It is solid for me. It would seem to be an ac13 feature.

It is. The fix is below.

The problem is that with async write-behind, buffers on the per-inode dirty list can be cleaned and I/O can complete before the vm scanner identifies the clean buffer and refiles it (which will remove if from the inode list). So, we can end up with clean buffers on the per-inode dirty list. It is quite legal to recycle these buffers, and try_to_free_buffers() already owns the necessary spinlocks to do so by the time it gets this far.

--Stephen

fs/buffer.c renamed from fs/buffer.c.~1~ +1 -3
@@ -2438,9 +2438,7 @@
 		 * queues or on the free list..
 		 */
 		if (p->b_dev != B_FREE) {
-			// @@@
-			if (p->b_inode)
-				BUG();
+			remove_inode_queue(p);
 			__remove_from_queues(p);
 		}
 		else