mtd device for rootfs with kernel 2.4.18

Armin Schindler acs at
Wed Apr 3 08:45:43 EST 2002


I hope someone can help with the following :

- MTD Partitions
  (mtd from CVS about 2 weeks ago, no changes in the important
  parts since then)
- JFFS2 as root filesystem on one mtd partition
  (JFFS2 from CVS jffs2-2_4-branch)
- Kernel 2.4.18

The problem is, when the kernel tries to mount the rootfs, it just
hangs. This is because it waits for a semaphore s_umount of the
superblock structure.

This semaphore was introduced in kernel 2.4.4 (I believe) and is
down during the loop for fs_types in fs/super.c. It is still down,
when blkdev_put() is called, where the mtdblock's release function
is called. This release function calls invalidate_device() which also
calls other functions where the s_umount semaphore is "downed" too.

I'm not that familiar with the mount-rootfs or the mtdblock code to
propose a patch here. 
Maybe moving the up_write(&sb->s_umount); before the blkdev_put()
would be a solution, but I don't know the impact...

Or did I overlook something here ?


More information about the linux-mtd mailing list