aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/cryptd.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-08-26 07:12:47 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:55:41 -0400
commit2de98e75449fc1c43d2fbb857668ae62d4f5eece (patch)
treeda472cafdc8688664011cf05b655db55a051b4e7 /crypto/cryptd.c
parent791b4d5f73cbc16ee532ebac5bd82d51524d4f99 (diff)
[CRYPTO] ablkcipher: Remove queue pointer from common alg object
Since not everyone needs a queue pointer and those who need it can always get it from the context anyway the queue pointer in the common alg object is redundant. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/cryptd.c')
-rw-r--r--crypto/cryptd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/crypto/cryptd.c b/crypto/cryptd.c
index ac6dce2e759..8bf2da835f7 100644
--- a/crypto/cryptd.c
+++ b/crypto/cryptd.c
@@ -131,7 +131,7 @@ static int cryptd_blkcipher_enqueue(struct ablkcipher_request *req,
131 req->base.complete = complete; 131 req->base.complete = complete;
132 132
133 spin_lock_bh(&state->lock); 133 spin_lock_bh(&state->lock);
134 err = ablkcipher_enqueue_request(crypto_ablkcipher_alg(tfm), req); 134 err = ablkcipher_enqueue_request(&state->queue, req);
135 spin_unlock_bh(&state->lock); 135 spin_unlock_bh(&state->lock);
136 136
137 wake_up_process(state->task); 137 wake_up_process(state->task);
@@ -173,7 +173,8 @@ static void cryptd_blkcipher_exit_tfm(struct crypto_tfm *tfm)
173 int active; 173 int active;
174 174
175 mutex_lock(&state->mutex); 175 mutex_lock(&state->mutex);
176 active = ablkcipher_tfm_in_queue(__crypto_ablkcipher_cast(tfm)); 176 active = ablkcipher_tfm_in_queue(&state->queue,
177 __crypto_ablkcipher_cast(tfm));
177 mutex_unlock(&state->mutex); 178 mutex_unlock(&state->mutex);
178 179
179 BUG_ON(active); 180 BUG_ON(active);
@@ -251,8 +252,6 @@ static struct crypto_instance *cryptd_alloc_blkcipher(
251 inst->alg.cra_ablkcipher.encrypt = cryptd_blkcipher_encrypt_enqueue; 252 inst->alg.cra_ablkcipher.encrypt = cryptd_blkcipher_encrypt_enqueue;
252 inst->alg.cra_ablkcipher.decrypt = cryptd_blkcipher_decrypt_enqueue; 253 inst->alg.cra_ablkcipher.decrypt = cryptd_blkcipher_decrypt_enqueue;
253 254
254 inst->alg.cra_ablkcipher.queue = &state->queue;
255
256out_put_alg: 255out_put_alg:
257 crypto_mod_put(alg); 256 crypto_mod_put(alg);
258 return inst; 257 return inst;