Commit 902af369 authored by Zheng Yongjun's avatar Zheng Yongjun Committed by Tyler Hicks
Browse files

ecryptfs: use DEFINE_MUTEX() for mutex lock



mutex lock can be initialized automatically with DEFINE_MUTEX()
rather than explicitly calling mutex_init().

Signed-off-by: default avatarZheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: default avatarTyler Hicks <code@tyhicks.com>
parent d0eb2d86
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1590,11 +1590,10 @@ ecryptfs_process_key_cipher(struct crypto_skcipher **key_tfm,

struct kmem_cache *ecryptfs_key_tfm_cache;
static struct list_head key_tfm_list;
struct mutex key_tfm_list_mutex;
DEFINE_MUTEX(key_tfm_list_mutex);

int __init ecryptfs_init_crypto(void)
{
	mutex_init(&key_tfm_list_mutex);
	INIT_LIST_HEAD(&key_tfm_list);
	return 0;
}