diff -Nru subfs-0.9.old/subfs.c subfs-0.9/subfs.c --- subfs-0.9.old/subfs.c 2006-09-21 09:06:42.397882034 +0200 +++ subfs-0.9/subfs.c 2006-09-21 09:45:50.420624284 +0200 @@ -405,12 +405,12 @@ * subfs_mount structure is pointed to by the s_fs_info field of the * superblock structure. */ -static struct super_block *subfs_get_super(struct file_system_type *fst, - int flags, const char *devname, void *data) +static int subfs_get_super(struct file_system_type *fst, + int flags, const char *devname, void *data, struct vfsmount *mnt) { char *device; struct subfs_mount *newmount; - int ret; + int ret, error; if (!(newmount = kmalloc(sizeof(struct subfs_mount), GFP_KERNEL))) return ERR_PTR(-ENOMEM); @@ -429,9 +429,22 @@ strcpy(newmount->helper_prog, SUBMOUNTD_PATH); if ((ret = proc_opts(newmount, data))) return ERR_PTR(ret); - newmount->sb = get_sb_nodev(fst, flags, data, subfs_fill_super); + + newmount->sb = sget(fst, NULL, set_anon_super, NULL); + if (IS_ERR(newmount->sb)) + return PTR_ERR(newmount->sb); + newmount->sb->s_flags = flags; + error = subfs_fill_super(newmount->sb, data, flags & MS_SILENT ? 1 : 0); + if (error) { + up_write(&newmount->sb->s_umount); + deactivate_super(newmount->sb); + return error; + } + newmount->sb->s_flags |= MS_ACTIVE; + newmount->sb->s_fs_info = newmount; - return newmount->sb; + + return simple_set_mnt(mnt, newmount->sb); } diff -Nru subfs-0.9.old/subfs.h subfs-0.9/subfs.h --- subfs-0.9.old/subfs.h 2006-09-21 09:06:42.397882034 +0200 +++ subfs-0.9/subfs.h 2006-09-21 09:45:50.444625784 +0200 @@ -33,8 +33,8 @@ static void subfs_kill_super(struct super_block *sb); -static struct super_block *subfs_get_super(struct file_system_type *fst, - int flags, const char *devname, void *data); +static int subfs_get_super(struct file_system_type *fst, + int flags, const char *devname, void *data, struct vfsmount *mnt); static struct vfsmount *get_subfs_vfsmount(struct super_block *sb); static int subfs_fill_super(struct super_block *sb, void *data, int silent);