===== fs/namespace.c 1.49 vs edited ===== --- 1.49/fs/namespace.c Thu Jul 17 22:30:49 2003 +++ edited/fs/namespace.c Wed Oct 15 15:59:11 2003 @@ -23,6 +23,7 @@ #include #include +extern void __init super_init(void); extern int __init init_rootfs(void); extern int __init sysfs_init(void); @@ -1154,6 +1155,7 @@ d++; i--; } while (i); + super_init(); sysfs_init(); init_rootfs(); init_mount_tree(); ===== fs/super.c 1.108 vs edited ===== --- 1.108/fs/super.c Wed Oct 1 15:36:45 2003 +++ edited/fs/super.c Wed Oct 15 15:59:50 2003 @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -527,15 +528,22 @@ * Unnamed block devices are dummy devices used by virtual * filesystems which don't use real block-devices. -- jrs */ - -enum {Max_anon = 256}; -static unsigned long unnamed_dev_in_use[Max_anon/(8*sizeof(unsigned long))]; +enum {Max_anon = PAGE_SIZE * 8}; +static void *unnamed_dev_in_use; static spinlock_t unnamed_dev_lock = SPIN_LOCK_UNLOCKED;/* protects the above */ +void __init super_init(void) +{ + unnamed_dev_in_use = (void *)get_zeroed_page(GFP_KERNEL); + if (!unnamed_dev_in_use) + panic("Could not allocate anonymous device map"); +} + int set_anon_super(struct super_block *s, void *data) { int dev; spin_lock(&unnamed_dev_lock); + dev = find_first_zero_bit(unnamed_dev_in_use, Max_anon); if (dev == Max_anon) { spin_unlock(&unnamed_dev_lock);