]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - fs/ocfs2/super.c
[PATCH] Mark struct super_operations const
[mirror_ubuntu-hirsute-kernel.git] / fs / ocfs2 / super.c
index a6d2f8cc165b85da7c3e607b361913a7db65e02f..6534f92424dd213a4471a8da553439f9843daa37 100644 (file)
@@ -116,7 +116,7 @@ static void ocfs2_destroy_inode(struct inode *inode);
 
 static unsigned long long ocfs2_max_file_offset(unsigned int blockshift);
 
-static struct super_operations ocfs2_sops = {
+static const struct super_operations ocfs2_sops = {
        .statfs         = ocfs2_statfs,
        .alloc_inode    = ocfs2_alloc_inode,
        .destroy_inode  = ocfs2_destroy_inode,
@@ -1231,7 +1231,7 @@ static int ocfs2_setup_osb_uuid(struct ocfs2_super *osb, const unsigned char *uu
 
        BUG_ON(uuid_bytes != OCFS2_VOL_UUID_LEN);
 
-       osb->uuid_str = kcalloc(1, OCFS2_VOL_UUID_LEN * 2 + 1, GFP_KERNEL);
+       osb->uuid_str = kzalloc(OCFS2_VOL_UUID_LEN * 2 + 1, GFP_KERNEL);
        if (osb->uuid_str == NULL)
                return -ENOMEM;
 
@@ -1262,7 +1262,7 @@ static int ocfs2_initialize_super(struct super_block *sb,
 
        mlog_entry_void();
 
-       osb = kcalloc(1, sizeof(struct ocfs2_super), GFP_KERNEL);
+       osb = kzalloc(sizeof(struct ocfs2_super), GFP_KERNEL);
        if (!osb) {
                status = -ENOMEM;
                mlog_errno(status);
@@ -1387,7 +1387,7 @@ static int ocfs2_initialize_super(struct super_block *sb,
         */
        /* initialize our journal structure */
 
-       journal = kcalloc(1, sizeof(struct ocfs2_journal), GFP_KERNEL);
+       journal = kzalloc(sizeof(struct ocfs2_journal), GFP_KERNEL);
        if (!journal) {
                mlog(ML_ERROR, "unable to alloc journal\n");
                status = -ENOMEM;