fs: Limit sys_mount to only request filesystem modules (Part 2).
[platform/adaptation/renesas_rcar/renesas_kernel.git] / fs / ocfs2 / super.c
index 0e91ec2..01b8516 100644 (file)
@@ -1266,6 +1266,7 @@ static struct file_system_type ocfs2_fs_type = {
        .fs_flags       = FS_REQUIRES_DEV|FS_RENAME_DOES_D_MOVE,
        .next           = NULL
 };
+MODULE_ALIAS_FS("ocfs2");
 
 static int ocfs2_check_set_options(struct super_block *sb,
                                   struct mount_options *options)
@@ -2525,8 +2526,7 @@ static int ocfs2_check_volume(struct ocfs2_super *osb)
                mlog_errno(status);
 
 finally:
-       if (local_alloc)
-               kfree(local_alloc);
+       kfree(local_alloc);
 
        if (status)
                mlog_errno(status);
@@ -2553,8 +2553,7 @@ static void ocfs2_delete_osb(struct ocfs2_super *osb)
         * we free it here.
         */
        kfree(osb->journal);
-       if (osb->local_alloc_copy)
-               kfree(osb->local_alloc_copy);
+       kfree(osb->local_alloc_copy);
        kfree(osb->uuid_str);
        ocfs2_put_dlm_debug(osb->osb_dlm_debug);
        memset(osb, 0, sizeof(struct ocfs2_super));