Lines Matching refs:lower_dentry
28 struct dentry **lower_dentry, in lock_parent() argument
35 *lower_dentry = ecryptfs_dentry_to_lower(dentry); in lock_parent()
38 return (*lower_dentry)->d_parent == lower_dir_dentry ? 0 : -EINVAL; in lock_parent()
117 static int ecryptfs_interpose(struct dentry *lower_dentry, in ecryptfs_interpose() argument
120 struct inode *inode = ecryptfs_get_inode(d_inode(lower_dentry), sb); in ecryptfs_interpose()
132 struct dentry *lower_dentry; in ecryptfs_do_unlink() local
136 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_do_unlink()
137 dget(lower_dentry); // don't even try to make the lower negative in ecryptfs_do_unlink()
139 if (d_unhashed(lower_dentry)) in ecryptfs_do_unlink()
142 rc = vfs_unlink(&nop_mnt_idmap, lower_dir, lower_dentry, in ecryptfs_do_unlink()
153 dput(lower_dentry); in ecryptfs_do_unlink()
177 struct dentry *lower_dentry; in ecryptfs_do_create() local
181 rc = lock_parent(ecryptfs_dentry, &lower_dentry, &lower_dir); in ecryptfs_do_create()
184 lower_dentry, mode, true); in ecryptfs_do_create()
191 inode = __ecryptfs_get_inode(d_inode(lower_dentry), in ecryptfs_do_create()
194 vfs_unlink(&nop_mnt_idmap, lower_dir, lower_dentry, NULL); in ecryptfs_do_create()
320 struct dentry *lower_dentry) in ecryptfs_lookup_interpose() argument
329 dput(lower_dentry); in ecryptfs_lookup_interpose()
335 BUG_ON(!d_count(lower_dentry)); in ecryptfs_lookup_interpose()
339 dentry_info->lower_path.dentry = lower_dentry; in ecryptfs_lookup_interpose()
347 lower_inode = READ_ONCE(lower_dentry->d_inode); in ecryptfs_lookup_interpose()
388 struct dentry *lower_dir_dentry, *lower_dentry; in ecryptfs_lookup() local
410 lower_dentry = lookup_one_len_unlocked(name, lower_dir_dentry, len); in ecryptfs_lookup()
411 if (IS_ERR(lower_dentry)) { in ecryptfs_lookup()
414 PTR_ERR(lower_dentry), in ecryptfs_lookup()
416 res = ERR_CAST(lower_dentry); in ecryptfs_lookup()
418 res = ecryptfs_lookup_interpose(ecryptfs_dentry, lower_dentry); in ecryptfs_lookup()
464 struct dentry *lower_dentry; in ecryptfs_symlink() local
470 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_symlink()
481 rc = vfs_symlink(&nop_mnt_idmap, lower_dir, lower_dentry, in ecryptfs_symlink()
484 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_symlink()
486 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_symlink()
502 struct dentry *lower_dentry; in ecryptfs_mkdir() local
505 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_mkdir()
508 lower_dentry, mode); in ecryptfs_mkdir()
509 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mkdir()
511 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mkdir()
526 struct dentry *lower_dentry; in ecryptfs_rmdir() local
530 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_rmdir()
531 dget(lower_dentry); // don't even try to make the lower negative in ecryptfs_rmdir()
533 if (d_unhashed(lower_dentry)) in ecryptfs_rmdir()
536 rc = vfs_rmdir(&nop_mnt_idmap, lower_dir, lower_dentry); in ecryptfs_rmdir()
543 dput(lower_dentry); in ecryptfs_rmdir()
555 struct dentry *lower_dentry; in ecryptfs_mknod() local
558 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_mknod()
561 lower_dentry, mode, dev); in ecryptfs_mknod()
562 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mknod()
564 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mknod()
643 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_readlink_lower() local
648 link = vfs_get_link(lower_dentry, &done); in ecryptfs_readlink_lower()
856 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_truncate() local
858 inode_lock(d_inode(lower_dentry)); in ecryptfs_truncate()
859 rc = notify_change(&nop_mnt_idmap, lower_dentry, in ecryptfs_truncate()
861 inode_unlock(d_inode(lower_dentry)); in ecryptfs_truncate()
891 struct dentry *lower_dentry; in ecryptfs_setattr() local
905 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_setattr()
967 inode_lock(d_inode(lower_dentry)); in ecryptfs_setattr()
968 rc = notify_change(&nop_mnt_idmap, lower_dentry, &lower_ia, NULL); in ecryptfs_setattr()
969 inode_unlock(d_inode(lower_dentry)); in ecryptfs_setattr()
1027 struct dentry *lower_dentry; in ecryptfs_setxattr() local
1030 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_setxattr()
1031 lower_inode = d_inode(lower_dentry); in ecryptfs_setxattr()
1037 rc = __vfs_setxattr_locked(&nop_mnt_idmap, lower_dentry, name, value, size, flags, NULL); in ecryptfs_setxattr()
1046 ecryptfs_getxattr_lower(struct dentry *lower_dentry, struct inode *lower_inode, in ecryptfs_getxattr_lower() argument
1056 rc = __vfs_getxattr(lower_dentry, lower_inode, name, value, size); in ecryptfs_getxattr_lower()
1075 struct dentry *lower_dentry; in ecryptfs_listxattr() local
1077 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_listxattr()
1078 if (!d_inode(lower_dentry)->i_op->listxattr) { in ecryptfs_listxattr()
1082 inode_lock(d_inode(lower_dentry)); in ecryptfs_listxattr()
1083 rc = d_inode(lower_dentry)->i_op->listxattr(lower_dentry, list, size); in ecryptfs_listxattr()
1084 inode_unlock(d_inode(lower_dentry)); in ecryptfs_listxattr()
1093 struct dentry *lower_dentry; in ecryptfs_removexattr() local
1096 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_removexattr()
1103 rc = __vfs_removexattr(&nop_mnt_idmap, lower_dentry, name); in ecryptfs_removexattr()
1117 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_fileattr_set() local
1120 rc = vfs_fileattr_set(&nop_mnt_idmap, lower_dentry, fa); in ecryptfs_fileattr_set()
1121 fsstack_copy_attr_all(d_inode(dentry), d_inode(lower_dentry)); in ecryptfs_fileattr_set()
1138 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_set_acl() local
1139 struct inode *lower_inode = d_inode(lower_dentry); in ecryptfs_set_acl()
1141 rc = vfs_set_acl(&nop_mnt_idmap, lower_dentry, in ecryptfs_set_acl()