By putting in an up_read(&sb->s_umount) just before blkdev_put() solves my
problem.
Do I need to increase the sb->s_active as well ???
Just wantet to point this out in case this is a bug.
BTW the down_write() just before the goto mount_it; has no effect as the
first statement after the label is up_write() on the same semapohre
Hereis a list of the relevant part of super.c with my alteration:
from line 1056:
sb = get_super(ROOT_DEV);
if (sb) {
/* FIXME */
p = (char *)sb->s_type->name;
atomic_inc(&sb->s_active);
up_read(&sb->s_umount);
down_write(&sb->s_umount);
goto mount_it;
}
for (p = fs_names; *p; p += strlen(p)+1) {
struct file_system_type * fs_type = get_fs_type(p);
if (!fs_type)
continue;
atomic_inc(&bdev->bd_count);
retval = blkdev_get(bdev, mode, 0, BDEV_FS);
if (retval)
goto Eio;
sb = read_super(ROOT_DEV, bdev, fs_type,
root_mountflags, root_mount_data);
put_filesystem(fs_type);
if (sb) {
up_read(&sb->s_umount); //This works
for jffs2
blkdev_put(bdev, BDEV_FS);
goto mount_it;
}
}
Best regards
Gusti
-- Agust Karlsson mailto:gusti@pallas.dk Pallas Informatik A/S http://www.pallas.dk Allerød Stationsvej 2D Tel.: +45 48 10 24 10 DK-3450 Allerød Fax.: +45 48 10 24 01
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/