ecryptfs: fix missed mutex_unlock
authorCyrill Gorcunov <gorcunov@gmail.com>
Fri, 23 May 2008 20:04:20 +0000 (13:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 24 May 2008 16:56:07 +0000 (09:56 -0700)
Cc: Michael Halcrow <mhalcrow@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ecryptfs/crypto.c

index cd62d75b2cc030d27b275423eaba578b3c93eceb..e2832bc7869a2ed357ff85763f4ed811af29592e 100644 (file)
@@ -1906,9 +1906,9 @@ int ecryptfs_get_tfm_and_mutex_for_cipher_name(struct crypto_blkcipher **tfm,
                        goto out;
                }
        }
-       mutex_unlock(&key_tfm_list_mutex);
        (*tfm) = key_tfm->key_tfm;
        (*tfm_mutex) = &key_tfm->key_tfm_mutex;
 out:
+       mutex_unlock(&key_tfm_list_mutex);
        return rc;
 }