Re: [patch] FS (ext2) corruption generated by BLKFLSBUF/invalidate_buffers

Andrea Arcangeli (andrea@suse.de)
Wed, 1 Dec 1999 01:08:12 +0100 (CET)


On Tue, 30 Nov 1999, Jason T Collins wrote:

>[..] But it doesn't fix

Woops, I seen one problem. Could you try again after applying this
incremental fix over your current tree?

--- 2.2.14pre9-buf-races/fs/buffer.c.~1~ Wed Dec 1 00:55:05 1999
+++ 2.2.14pre9-buf-races/fs/buffer.c Wed Dec 1 00:59:05 1999
@@ -627,14 +627,13 @@
bhnext = bh->b_next_free;
if (bh->b_dev != dev)
continue;
- if (!destroy_dirty_buffers && buffer_dirty(bh))
- continue;
if (buffer_locked(bh))
{
slept = 1;
__wait_on_buffer(bh);
}
- if (!bh->b_count)
+ if (!bh->b_count &&
+ (destroy_dirty_buffers || !buffer_dirty(bh)))
put_last_free(bh);
if (slept)
goto again;

A new global patch against stock 2.2.14pre9 is here:

ftp://ftp.*.kernel.org/pub/linux/kernel/people/andrea/patches/v2.2/2.2.14pre9/buffer-races-3.gz

Andrea

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/