diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-04-09 04:05:30 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-04-09 04:05:30 -0400 |
commit | 664cee46e755b37204f1731cb8726db610f3486d (patch) | |
tree | 11ed0d43eff14123534785cf25c0a2143e134e7e /fs/ecryptfs/main.c | |
parent | a0334c50bf0ba7c720ed00f931e721c989efd233 (diff) | |
parent | 4e29402fe4b2006c994eed5020c42b2cc87d9b42 (diff) |
Merge branch 'fix/asoc' into for-linus
Diffstat (limited to 'fs/ecryptfs/main.c')
-rw-r--r-- | fs/ecryptfs/main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index 758323a0f09a..c27c0ecf90bc 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c | |||
@@ -122,7 +122,6 @@ int ecryptfs_init_persistent_file(struct dentry *ecryptfs_dentry) | |||
122 | ecryptfs_inode_to_private(ecryptfs_dentry->d_inode); | 122 | ecryptfs_inode_to_private(ecryptfs_dentry->d_inode); |
123 | int rc = 0; | 123 | int rc = 0; |
124 | 124 | ||
125 | mutex_lock(&inode_info->lower_file_mutex); | ||
126 | if (!inode_info->lower_file) { | 125 | if (!inode_info->lower_file) { |
127 | struct dentry *lower_dentry; | 126 | struct dentry *lower_dentry; |
128 | struct vfsmount *lower_mnt = | 127 | struct vfsmount *lower_mnt = |
@@ -138,7 +137,6 @@ int ecryptfs_init_persistent_file(struct dentry *ecryptfs_dentry) | |||
138 | inode_info->lower_file = NULL; | 137 | inode_info->lower_file = NULL; |
139 | } | 138 | } |
140 | } | 139 | } |
141 | mutex_unlock(&inode_info->lower_file_mutex); | ||
142 | return rc; | 140 | return rc; |
143 | } | 141 | } |
144 | 142 | ||
@@ -241,14 +239,14 @@ static int ecryptfs_init_global_auth_toks( | |||
241 | struct ecryptfs_mount_crypt_stat *mount_crypt_stat) | 239 | struct ecryptfs_mount_crypt_stat *mount_crypt_stat) |
242 | { | 240 | { |
243 | struct ecryptfs_global_auth_tok *global_auth_tok; | 241 | struct ecryptfs_global_auth_tok *global_auth_tok; |
242 | struct ecryptfs_auth_tok *auth_tok; | ||
244 | int rc = 0; | 243 | int rc = 0; |
245 | 244 | ||
246 | list_for_each_entry(global_auth_tok, | 245 | list_for_each_entry(global_auth_tok, |
247 | &mount_crypt_stat->global_auth_tok_list, | 246 | &mount_crypt_stat->global_auth_tok_list, |
248 | mount_crypt_stat_list) { | 247 | mount_crypt_stat_list) { |
249 | rc = ecryptfs_keyring_auth_tok_for_sig( | 248 | rc = ecryptfs_keyring_auth_tok_for_sig( |
250 | &global_auth_tok->global_auth_tok_key, | 249 | &global_auth_tok->global_auth_tok_key, &auth_tok, |
251 | &global_auth_tok->global_auth_tok, | ||
252 | global_auth_tok->sig); | 250 | global_auth_tok->sig); |
253 | if (rc) { | 251 | if (rc) { |
254 | printk(KERN_ERR "Could not find valid key in user " | 252 | printk(KERN_ERR "Could not find valid key in user " |
@@ -256,8 +254,10 @@ static int ecryptfs_init_global_auth_toks( | |||
256 | "option: [%s]\n", global_auth_tok->sig); | 254 | "option: [%s]\n", global_auth_tok->sig); |
257 | global_auth_tok->flags |= ECRYPTFS_AUTH_TOK_INVALID; | 255 | global_auth_tok->flags |= ECRYPTFS_AUTH_TOK_INVALID; |
258 | goto out; | 256 | goto out; |
259 | } else | 257 | } else { |
260 | global_auth_tok->flags &= ~ECRYPTFS_AUTH_TOK_INVALID; | 258 | global_auth_tok->flags &= ~ECRYPTFS_AUTH_TOK_INVALID; |
259 | up_write(&(global_auth_tok->global_auth_tok_key)->sem); | ||
260 | } | ||
261 | } | 261 | } |
262 | out: | 262 | out: |
263 | return rc; | 263 | return rc; |