diff options
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/ecryptfs/inode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 5ed86e25b8a2..d8325263ba6e 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c | |||
| @@ -379,9 +379,11 @@ static struct dentry *ecryptfs_lookup(struct inode *ecryptfs_dir_inode, | |||
| 379 | goto out_d_drop; | 379 | goto out_d_drop; |
| 380 | } | 380 | } |
| 381 | lower_dir_dentry = ecryptfs_dentry_to_lower(ecryptfs_dentry->d_parent); | 381 | lower_dir_dentry = ecryptfs_dentry_to_lower(ecryptfs_dentry->d_parent); |
| 382 | mutex_lock(&lower_dir_dentry->d_inode->i_mutex); | ||
| 382 | lower_dentry = lookup_one_len(ecryptfs_dentry->d_name.name, | 383 | lower_dentry = lookup_one_len(ecryptfs_dentry->d_name.name, |
| 383 | lower_dir_dentry, | 384 | lower_dir_dentry, |
| 384 | ecryptfs_dentry->d_name.len); | 385 | ecryptfs_dentry->d_name.len); |
| 386 | mutex_unlock(&lower_dir_dentry->d_inode->i_mutex); | ||
| 385 | if (IS_ERR(lower_dentry)) { | 387 | if (IS_ERR(lower_dentry)) { |
| 386 | rc = PTR_ERR(lower_dentry); | 388 | rc = PTR_ERR(lower_dentry); |
| 387 | printk(KERN_ERR "%s: lookup_one_len() returned [%d] on " | 389 | printk(KERN_ERR "%s: lookup_one_len() returned [%d] on " |
| @@ -406,9 +408,11 @@ static struct dentry *ecryptfs_lookup(struct inode *ecryptfs_dir_inode, | |||
| 406 | "filename; rc = [%d]\n", __func__, rc); | 408 | "filename; rc = [%d]\n", __func__, rc); |
| 407 | goto out_d_drop; | 409 | goto out_d_drop; |
| 408 | } | 410 | } |
| 411 | mutex_lock(&lower_dir_dentry->d_inode->i_mutex); | ||
| 409 | lower_dentry = lookup_one_len(encrypted_and_encoded_name, | 412 | lower_dentry = lookup_one_len(encrypted_and_encoded_name, |
| 410 | lower_dir_dentry, | 413 | lower_dir_dentry, |
| 411 | encrypted_and_encoded_name_size - 1); | 414 | encrypted_and_encoded_name_size - 1); |
| 415 | mutex_unlock(&lower_dir_dentry->d_inode->i_mutex); | ||
| 412 | if (IS_ERR(lower_dentry)) { | 416 | if (IS_ERR(lower_dentry)) { |
| 413 | rc = PTR_ERR(lower_dentry); | 417 | rc = PTR_ERR(lower_dentry); |
| 414 | printk(KERN_ERR "%s: lookup_one_len() returned [%d] on " | 418 | printk(KERN_ERR "%s: lookup_one_len() returned [%d] on " |
