diff options
Diffstat (limited to 'fs/ecryptfs/crypto.c')
-rw-r--r-- | fs/ecryptfs/crypto.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c index 4610fd6afcef..520783b205a1 100644 --- a/fs/ecryptfs/crypto.c +++ b/fs/ecryptfs/crypto.c | |||
@@ -923,7 +923,9 @@ static int ecryptfs_copy_mount_wide_sigs_to_inode_sigs( | |||
923 | struct ecryptfs_global_auth_tok *global_auth_tok; | 923 | struct ecryptfs_global_auth_tok *global_auth_tok; |
924 | int rc = 0; | 924 | int rc = 0; |
925 | 925 | ||
926 | mutex_lock(&crypt_stat->keysig_list_mutex); | ||
926 | mutex_lock(&mount_crypt_stat->global_auth_tok_list_mutex); | 927 | mutex_lock(&mount_crypt_stat->global_auth_tok_list_mutex); |
928 | |||
927 | list_for_each_entry(global_auth_tok, | 929 | list_for_each_entry(global_auth_tok, |
928 | &mount_crypt_stat->global_auth_tok_list, | 930 | &mount_crypt_stat->global_auth_tok_list, |
929 | mount_crypt_stat_list) { | 931 | mount_crypt_stat_list) { |
@@ -932,13 +934,13 @@ static int ecryptfs_copy_mount_wide_sigs_to_inode_sigs( | |||
932 | rc = ecryptfs_add_keysig(crypt_stat, global_auth_tok->sig); | 934 | rc = ecryptfs_add_keysig(crypt_stat, global_auth_tok->sig); |
933 | if (rc) { | 935 | if (rc) { |
934 | printk(KERN_ERR "Error adding keysig; rc = [%d]\n", rc); | 936 | printk(KERN_ERR "Error adding keysig; rc = [%d]\n", rc); |
935 | mutex_unlock( | ||
936 | &mount_crypt_stat->global_auth_tok_list_mutex); | ||
937 | goto out; | 937 | goto out; |
938 | } | 938 | } |
939 | } | 939 | } |
940 | mutex_unlock(&mount_crypt_stat->global_auth_tok_list_mutex); | 940 | |
941 | out: | 941 | out: |
942 | mutex_unlock(&mount_crypt_stat->global_auth_tok_list_mutex); | ||
943 | mutex_unlock(&crypt_stat->keysig_list_mutex); | ||
942 | return rc; | 944 | return rc; |
943 | } | 945 | } |
944 | 946 | ||