]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ecryptfs: fix missed mutex_unlock
authorCyrill Gorcunov <gorcunov@gmail.com>
Sun, 8 Jun 2008 09:00:36 +0000 (11:00 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 16 Jun 2008 20:19:51 +0000 (13:19 -0700)
upstream commit: 71fd5179e8d1d4d503b517e0c5374f7c49540bfc

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>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
fs/ecryptfs/crypto.c

index a066e109ad9c05a7cbc0670f92045a3475e9aac1..086b312e41a6ba6a02cd1e71a7d2ee4261b62fc7 100644 (file)
@@ -1907,9 +1907,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;
 }