Re: minix fs corruption fix for 2.4

From: Konstantin Boldyshev
Date: Tue Nov 04 2003 - 01:32:27 EST


On Mon, 3 Nov 2003, Linus Torvalds wrote:

> > Enclosed is a simple patch to fix corruption of minix filesystem
> > when deleting character and block device nodes (special files).
> > From what I've found out the bug was introduced somehwere in 2.3
> > and is present in all 2.4 versions, and I guess also goes into 2.6.
>
> Oops, yes.
>
> The problem is that block and character devices put not a block
> number but a _device_ number in the place where other files put
> their block allocations.

Yes, it took some time to find out why particular blocks
are being freed when I delete particular device nodes.

> Your patch is wrong, though - you shouldn't test for APPEND
> and IMMUTABLE here. That should be done at higher layers.

Perhaps. I just added the same check as ext2 code does in ext2_truncate().

--
Regards,
Konstantin

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