diff options
Diffstat (limited to 'fs/ecryptfs/inode.c')
-rw-r--r-- | fs/ecryptfs/inode.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 9d1a22d62765..337352a94751 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c | |||
@@ -260,7 +260,7 @@ int ecryptfs_lookup_and_interpose_lower(struct dentry *ecryptfs_dentry, | |||
260 | ecryptfs_dentry->d_parent)); | 260 | ecryptfs_dentry->d_parent)); |
261 | lower_inode = lower_dentry->d_inode; | 261 | lower_inode = lower_dentry->d_inode; |
262 | fsstack_copy_attr_atime(ecryptfs_dir_inode, lower_dir_dentry->d_inode); | 262 | fsstack_copy_attr_atime(ecryptfs_dir_inode, lower_dir_dentry->d_inode); |
263 | BUG_ON(!atomic_read(&lower_dentry->d_count)); | 263 | BUG_ON(!lower_dentry->d_count); |
264 | ecryptfs_set_dentry_private(ecryptfs_dentry, | 264 | ecryptfs_set_dentry_private(ecryptfs_dentry, |
265 | kmem_cache_alloc(ecryptfs_dentry_info_cache, | 265 | kmem_cache_alloc(ecryptfs_dentry_info_cache, |
266 | GFP_KERNEL)); | 266 | GFP_KERNEL)); |
@@ -441,7 +441,7 @@ static struct dentry *ecryptfs_lookup(struct inode *ecryptfs_dir_inode, | |||
441 | struct qstr lower_name; | 441 | struct qstr lower_name; |
442 | int rc = 0; | 442 | int rc = 0; |
443 | 443 | ||
444 | ecryptfs_dentry->d_op = &ecryptfs_dops; | 444 | d_set_d_op(ecryptfs_dentry, &ecryptfs_dops); |
445 | if ((ecryptfs_dentry->d_name.len == 1 | 445 | if ((ecryptfs_dentry->d_name.len == 1 |
446 | && !strcmp(ecryptfs_dentry->d_name.name, ".")) | 446 | && !strcmp(ecryptfs_dentry->d_name.name, ".")) |
447 | || (ecryptfs_dentry->d_name.len == 2 | 447 | || (ecryptfs_dentry->d_name.len == 2 |
@@ -454,7 +454,7 @@ static struct dentry *ecryptfs_lookup(struct inode *ecryptfs_dir_inode, | |||
454 | lower_name.hash = ecryptfs_dentry->d_name.hash; | 454 | lower_name.hash = ecryptfs_dentry->d_name.hash; |
455 | if (lower_dir_dentry->d_op && lower_dir_dentry->d_op->d_hash) { | 455 | if (lower_dir_dentry->d_op && lower_dir_dentry->d_op->d_hash) { |
456 | rc = lower_dir_dentry->d_op->d_hash(lower_dir_dentry, | 456 | rc = lower_dir_dentry->d_op->d_hash(lower_dir_dentry, |
457 | &lower_name); | 457 | lower_dir_dentry->d_inode, &lower_name); |
458 | if (rc < 0) | 458 | if (rc < 0) |
459 | goto out_d_drop; | 459 | goto out_d_drop; |
460 | } | 460 | } |
@@ -489,7 +489,7 @@ static struct dentry *ecryptfs_lookup(struct inode *ecryptfs_dir_inode, | |||
489 | lower_name.hash = full_name_hash(lower_name.name, lower_name.len); | 489 | lower_name.hash = full_name_hash(lower_name.name, lower_name.len); |
490 | if (lower_dir_dentry->d_op && lower_dir_dentry->d_op->d_hash) { | 490 | if (lower_dir_dentry->d_op && lower_dir_dentry->d_op->d_hash) { |
491 | rc = lower_dir_dentry->d_op->d_hash(lower_dir_dentry, | 491 | rc = lower_dir_dentry->d_op->d_hash(lower_dir_dentry, |
492 | &lower_name); | 492 | lower_dir_dentry->d_inode, &lower_name); |
493 | if (rc < 0) | 493 | if (rc < 0) |
494 | goto out_d_drop; | 494 | goto out_d_drop; |
495 | } | 495 | } |
@@ -980,8 +980,10 @@ int ecryptfs_truncate(struct dentry *dentry, loff_t new_length) | |||
980 | } | 980 | } |
981 | 981 | ||
982 | static int | 982 | static int |
983 | ecryptfs_permission(struct inode *inode, int mask) | 983 | ecryptfs_permission(struct inode *inode, int mask, unsigned int flags) |
984 | { | 984 | { |
985 | if (flags & IPERM_FLAG_RCU) | ||
986 | return -ECHILD; | ||
985 | return inode_permission(ecryptfs_inode_to_lower(inode), mask); | 987 | return inode_permission(ecryptfs_inode_to_lower(inode), mask); |
986 | } | 988 | } |
987 | 989 | ||