if (!ocfs2_parse_options(sb, data, &parsed_options, 0)) {
                status = -EINVAL;
-               goto read_super_error;
+               goto out;
        }
 
        /* probe for superblock */
        status = ocfs2_sb_probe(sb, &bh, §or_size, &stats);
        if (status < 0) {
                mlog(ML_ERROR, "superblock probe failed!\n");
-               goto read_super_error;
+               goto out;
        }
 
        status = ocfs2_initialize_super(sb, bh, sector_size, &stats);
-       osb = OCFS2_SB(sb);
-       if (status < 0) {
-               mlog_errno(status);
-               goto read_super_error;
-       }
        brelse(bh);
        bh = NULL;
+       if (status < 0)
+               goto out;
+
+       osb = OCFS2_SB(sb);
 
        if (!ocfs2_check_set_options(sb, &parsed_options)) {
                status = -EINVAL;
-               goto read_super_error;
+               goto out_super;
        }
        osb->s_mount_opt = parsed_options.mount_opt;
        osb->s_atime_quantum = parsed_options.atime_quantum;
 
        status = ocfs2_verify_userspace_stack(osb, &parsed_options);
        if (status)
-               goto read_super_error;
+               goto out_super;
 
        sb->s_magic = OCFS2_SUPER_MAGIC;
 
                        status = -EACCES;
                        mlog(ML_ERROR, "Readonly device detected but readonly "
                             "mount was not specified.\n");
-                       goto read_super_error;
+                       goto out_super;
                }
 
                /* You should not be able to start a local heartbeat
                        status = -EROFS;
                        mlog(ML_ERROR, "Local heartbeat specified on readonly "
                             "device.\n");
-                       goto read_super_error;
+                       goto out_super;
                }
 
                status = ocfs2_check_journals_nolocks(osb);
                                mlog(ML_ERROR, "Recovery required on readonly "
                                     "file system, but write access is "
                                     "unavailable.\n");
-                       else
-                               mlog_errno(status);
-                       goto read_super_error;
+                       goto out_super;
                }
 
                ocfs2_set_ro_flag(osb, 1);
        }
 
        status = ocfs2_verify_heartbeat(osb);
-       if (status < 0) {
-               mlog_errno(status);
-               goto read_super_error;
-       }
+       if (status < 0)
+               goto out_super;
 
        osb->osb_debug_root = debugfs_create_dir(osb->uuid_str,
                                                 ocfs2_debugfs_root);
 
        status = ocfs2_mount_volume(sb);
        if (status < 0)
-               goto read_super_error;
+               goto out_debugfs;
 
        if (osb->root_inode)
                inode = igrab(osb->root_inode);
 
        if (!inode) {
                status = -EIO;
-               mlog_errno(status);
-               goto read_super_error;
+               goto out_dismount;
        }
 
        osb->osb_dev_kset = kset_create_and_add(sb->s_id, NULL,
        if (!osb->osb_dev_kset) {
                status = -ENOMEM;
                mlog(ML_ERROR, "Unable to create device kset %s.\n", sb->s_id);
-               goto read_super_error;
+               goto out_dismount;
        }
 
        /* Create filecheck sysfs related directories/files at
                status = -ENOMEM;
                mlog(ML_ERROR, "Unable to create filecheck sysfs directory at "
                        "/sys/fs/ocfs2/%s/filecheck.\n", sb->s_id);
-               goto read_super_error;
+               goto out_dismount;
        }
 
        root = d_make_root(inode);
        if (!root) {
                status = -ENOMEM;
-               mlog_errno(status);
-               goto read_super_error;
+               goto out_dismount;
        }
 
        sb->s_root = root;
 
        return status;
 
-read_super_error:
-       brelse(bh);
-
-       if (status)
-               mlog_errno(status);
+out_dismount:
+       atomic_set(&osb->vol_state, VOLUME_DISABLED);
+       wake_up(&osb->osb_mount_event);
+       ocfs2_dismount_volume(sb, 1);
+       goto out;
 
-       if (osb) {
-               atomic_set(&osb->vol_state, VOLUME_DISABLED);
-               wake_up(&osb->osb_mount_event);
-               ocfs2_dismount_volume(sb, 1);
-       }
+out_debugfs:
+       debugfs_remove_recursive(osb->osb_debug_root);
+out_super:
+       ocfs2_release_system_inodes(osb);
+       kfree(osb->recovery_map);
+       ocfs2_delete_osb(osb);
+       kfree(osb);
+out:
+       mlog_errno(status);
 
        return status;
 }