diff -urNp --exclude CVS --exclude BitKeeper x-ref/fs/ext3/super.c x/fs/ext3/super.c --- x-ref/fs/ext3/super.c 2003-07-15 02:05:51.000000000 +0200 +++ x/fs/ext3/super.c 2003-07-17 01:27:39.000000000 +0200 @@ -1821,7 +1821,7 @@ static int __init init_ext3_fs(void) old_sync_dquot = ext3_qops.sync_dquot; ext3_qops.sync_dquot = ext3_sync_dquot; #endif - return register_filesystem(&ext3_fs_type); + return register_filesystem_lifo(&ext3_fs_type); } static void __exit exit_ext3_fs(void) diff -urNp --exclude CVS --exclude BitKeeper x-ref/fs/super.c x/fs/super.c --- x-ref/fs/super.c 2003-07-15 02:05:51.000000000 +0200 +++ x/fs/super.c 2003-07-17 01:27:25.000000000 +0200 @@ -89,7 +89,7 @@ static struct file_system_type **find_fi * unregistered. */ -int register_filesystem(struct file_system_type * fs) +int __register_filesystem(struct file_system_type * fs, int lifo) { int res = 0; struct file_system_type ** p; @@ -103,8 +103,14 @@ int register_filesystem(struct file_syst p = find_filesystem(fs->name); if (*p) res = -EBUSY; - else - *p = fs; + else { + if (!lifo) + *p = fs; + else { + fs->next = file_systems; + file_systems = fs; + } + } write_unlock(&file_systems_lock); return res; } diff -urNp --exclude CVS --exclude BitKeeper x-ref/include/linux/fs.h x/include/linux/fs.h --- x-ref/include/linux/fs.h 2003-07-15 02:05:53.000000000 +0200 +++ x/include/linux/fs.h 2003-07-17 01:27:25.000000000 +0200 @@ -1015,7 +1015,9 @@ do { \ __MOD_DEC_USE_COUNT((fops)->owner); \ } while(0) -extern int register_filesystem(struct file_system_type *); +extern int __register_filesystem(struct file_system_type *, int); +#define register_filesystem(fs) __register_filesystem(fs, 0) +#define register_filesystem_lifo(fs) __register_filesystem(fs, 1) extern int unregister_filesystem(struct file_system_type *); extern struct vfsmount *kern_mount(struct file_system_type *); extern int may_umount(struct vfsmount *); diff -urNp --exclude CVS --exclude BitKeeper x-ref/kernel/ksyms.c x/kernel/ksyms.c --- x-ref/kernel/ksyms.c 2003-07-17 01:27:24.000000000 +0200 +++ x/kernel/ksyms.c 2003-07-17 01:27:25.000000000 +0200 @@ -339,7 +339,7 @@ EXPORT_SYMBOL(tty_get_baud_rate); EXPORT_SYMBOL(do_SAK); /* filesystem registration */ -EXPORT_SYMBOL(register_filesystem); +EXPORT_SYMBOL(__register_filesystem); EXPORT_SYMBOL(unregister_filesystem); EXPORT_SYMBOL(kern_mount); EXPORT_SYMBOL(__mntput);