Re: [PATCH 2.3.48] initrd fix (Mike Galbraith)

From: Linus Torvalds (torvalds@transmeta.com)
Date: Sun Feb 27 2000 - 12:05:36 EST


Looks ok _except_ for this part that does

- if (atomic_dec_and_test(&bdev->bd_openers)) {
+ if (atomic_dec_and_test(&bdev->bd_openers) && MAJOR(rdev) != RAMDISK_MAJOR) {

in fs/block_dev.c..

I see exactly what you're trying to do, I just disagree with it violently.
I hate having these kinds of special cases in generic code - it turns them
into non-generic code.

It should be easily fixed in the initrd code itself, rather than in the
generic code: turning it from a special case into a normal well-behaved
case should be trivial. The way I would suggest is that initrd should just
open the block device one extra time very early on, and then close the
block device one extra time just before releasing all the initrd memory.

Would you be willing to look at that solution instead?

                Linus

-
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/



This archive was generated by hypermail 2b29 : Tue Feb 29 2000 - 21:00:17 EST