Whamcloud - gitweb
LU-1282 misc: Use present cpu numbers to save memory.
[fs/lustre-release.git] / lustre / obdclass / capa.c
index e042e0d..539910c 100644 (file)
@@ -1,6 +1,4 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
  * GPL HEADER START
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  * Author: Lai Siyao<lsy@clusterfs.com>
  */
 
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-
 #define DEBUG_SUBSYSTEM S_SEC
 
 #ifdef __KERNEL__
@@ -286,13 +280,13 @@ int capa_encrypt_id(__u32 *d, __u32 *s, __u8 *key, int keylen)
         char alg[CRYPTO_MAX_ALG_NAME+1] = "aes";
         ENTRY;
 
-        /* passing "aes" in a variable instead of a constant string keeps gcc
-         * 4.3.2 happy */
-        tfm = ll_crypto_alloc_blkcipher(alg, 0, 0 );
-        if (tfm == NULL) {
-                CERROR("failed to load transform for aes\n");
-                RETURN(-EFAULT);
-        }
+       /* passing "aes" in a variable instead of a constant string keeps gcc
+        * 4.3.2 happy */
+       tfm = ll_crypto_alloc_blkcipher(alg, 0, 0 );
+       if (IS_ERR(tfm)) {
+               CERROR("failed to load transform for aes\n");
+               RETURN(PTR_ERR(tfm));
+       }
 
         min = ll_crypto_tfm_alg_min_keysize(tfm);
         if (keylen < min) {
@@ -338,13 +332,13 @@ int capa_decrypt_id(__u32 *d, __u32 *s, __u8 *key, int keylen)
         char alg[CRYPTO_MAX_ALG_NAME+1] = "aes";
         ENTRY;
 
-        /* passing "aes" in a variable instead of a constant string keeps gcc
-         * 4.3.2 happy */
-        tfm = ll_crypto_alloc_blkcipher(alg, 0, 0 );
-        if (tfm == NULL) {
-                CERROR("failed to load transform for aes\n");
-                RETURN(-EFAULT);
-        }
+       /* passing "aes" in a variable instead of a constant string keeps gcc
+        * 4.3.2 happy */
+       tfm = ll_crypto_alloc_blkcipher(alg, 0, 0 );
+       if (IS_ERR(tfm)) {
+               CERROR("failed to load transform for aes\n");
+               RETURN(PTR_ERR(tfm));
+       }
 
         min = ll_crypto_tfm_alg_min_keysize(tfm);
         if (keylen < min) {