[S390] hypfs crashes with invalid mount option.
[linux-2.6.git] / arch / s390 / hypfs / inode.c
index bab560a..bdade5f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  fs/hypfs/inode.c
+ *  arch/s390/hypfs/inode.c
  *    Hypervisor filesystem for Linux on s390.
  *
  *    Copyright (C) IBM Corp. 2006
@@ -302,21 +302,22 @@ err_alloc:
        return rc;
 }
 
-static struct super_block *hypfs_get_super(struct file_system_type *fst,
-                                          int flags, const char *devname,
-                                          void *data)
+static int hypfs_get_super(struct file_system_type *fst, int flags,
+                       const char *devname, void *data, struct vfsmount *mnt)
 {
-       return get_sb_single(fst, flags, data, hypfs_fill_super);
+       return get_sb_single(fst, flags, data, hypfs_fill_super, mnt);
 }
 
 static void hypfs_kill_super(struct super_block *sb)
 {
        struct hypfs_sb_info *sb_info = sb->s_fs_info;
 
-       hypfs_delete_tree(sb->s_root);
-       hypfs_remove(sb_info->update_file);
-       kfree(sb->s_fs_info);
-       sb->s_fs_info = NULL;
+       if (sb->s_root) {
+               hypfs_delete_tree(sb->s_root);
+               hypfs_remove(sb_info->update_file);
+               kfree(sb->s_fs_info);
+               sb->s_fs_info = NULL;
+       }
        kill_litter_super(sb);
 }