[PATCH] slab: remove SLAB_KERNEL
[deliverable/linux.git] / fs / ecryptfs / main.c
index 5938a232d11bd3e3feed0ed01ae3ba5a04918c7f..a2c6ccbce300412236eff09f677c07eaa033b073 100644 (file)
@@ -208,7 +208,6 @@ static int ecryptfs_parse_options(struct super_block *sb, char *options)
        char *cipher_name_dst;
        char *cipher_name_src;
        char *cipher_key_bytes_src;
-       struct crypto_tfm *tmp_tfm;
        int cipher_name_len;
 
        if (!options) {
@@ -305,25 +304,19 @@ static int ecryptfs_parse_options(struct super_block *sb, char *options)
                    = '\0';
        }
        if (!cipher_key_bytes_set) {
-               mount_crypt_stat->global_default_cipher_key_size =
-                       ECRYPTFS_DEFAULT_KEY_BYTES;
-               ecryptfs_printk(KERN_DEBUG, "Cipher key size was not "
-                               "specified.  Defaulting to [%d]\n",
-                               mount_crypt_stat->
-                               global_default_cipher_key_size);
+               mount_crypt_stat->global_default_cipher_key_size = 0;
        }
        rc = ecryptfs_process_cipher(
-               &tmp_tfm,
                &mount_crypt_stat->global_key_tfm,
                mount_crypt_stat->global_default_cipher_name,
-               mount_crypt_stat->global_default_cipher_key_size);
-       if (tmp_tfm)
-               crypto_free_tfm(tmp_tfm);
+               &mount_crypt_stat->global_default_cipher_key_size);
        if (rc) {
                printk(KERN_ERR "Error attempting to initialize cipher [%s] "
                       "with key size [%Zd] bytes; rc = [%d]\n",
                       mount_crypt_stat->global_default_cipher_name,
                       mount_crypt_stat->global_default_cipher_key_size, rc);
+               mount_crypt_stat->global_key_tfm = NULL;
+               mount_crypt_stat->global_auth_tok_key = NULL;
                rc = -EINVAL;
                goto out;
        }
@@ -385,7 +378,7 @@ ecryptfs_fill_super(struct super_block *sb, void *raw_data, int silent)
        /* Released in ecryptfs_put_super() */
        ecryptfs_set_superblock_private(sb,
                                        kmem_cache_alloc(ecryptfs_sb_info_cache,
-                                                        SLAB_KERNEL));
+                                                        GFP_KERNEL));
        if (!ecryptfs_superblock_to_private(sb)) {
                ecryptfs_printk(KERN_WARNING, "Out of memory\n");
                rc = -ENOMEM;
@@ -409,7 +402,7 @@ ecryptfs_fill_super(struct super_block *sb, void *raw_data, int silent)
        /* through deactivate_super(sb) from get_sb_nodev() */
        ecryptfs_set_dentry_private(sb->s_root,
                                    kmem_cache_alloc(ecryptfs_dentry_info_cache,
-                                                    SLAB_KERNEL));
+                                                    GFP_KERNEL));
        if (!ecryptfs_dentry_to_private(sb->s_root)) {
                ecryptfs_printk(KERN_ERR,
                                "dentry_info_cache alloc failed\n");
This page took 0.043373 seconds and 5 git commands to generate.