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()
125 static int ecryptfs_interpose(struct dentry *lower_dentry, in ecryptfs_interpose() argument
128 struct inode *inode = ecryptfs_get_inode(d_inode(lower_dentry), sb); in ecryptfs_interpose()
140 struct dentry *lower_dentry; in ecryptfs_do_unlink() local
144 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_do_unlink()
145 dget(lower_dentry); // don't even try to make the lower negative in ecryptfs_do_unlink()
147 if (d_unhashed(lower_dentry)) in ecryptfs_do_unlink()
150 rc = vfs_unlink(&nop_mnt_idmap, lower_dir, lower_dentry, in ecryptfs_do_unlink()
161 dput(lower_dentry); in ecryptfs_do_unlink()
185 struct dentry *lower_dentry; in ecryptfs_do_create() local
189 rc = lock_parent(ecryptfs_dentry, &lower_dentry, &lower_dir); in ecryptfs_do_create()
192 lower_dentry, mode, true); in ecryptfs_do_create()
199 inode = __ecryptfs_get_inode(d_inode(lower_dentry), in ecryptfs_do_create()
202 vfs_unlink(&nop_mnt_idmap, lower_dir, lower_dentry, NULL); in ecryptfs_do_create()
328 struct dentry *lower_dentry) in ecryptfs_lookup_interpose() argument
337 dput(lower_dentry); in ecryptfs_lookup_interpose()
343 BUG_ON(!d_count(lower_dentry)); in ecryptfs_lookup_interpose()
347 dentry_info->lower_path.dentry = lower_dentry; in ecryptfs_lookup_interpose()
355 lower_inode = READ_ONCE(lower_dentry->d_inode); in ecryptfs_lookup_interpose()
396 struct dentry *lower_dir_dentry, *lower_dentry; in ecryptfs_lookup() local
418 lower_dentry = lookup_one_len_unlocked(name, lower_dir_dentry, len); in ecryptfs_lookup()
419 if (IS_ERR(lower_dentry)) { in ecryptfs_lookup()
422 PTR_ERR(lower_dentry), in ecryptfs_lookup()
424 res = ERR_CAST(lower_dentry); in ecryptfs_lookup()
426 res = ecryptfs_lookup_interpose(ecryptfs_dentry, lower_dentry); in ecryptfs_lookup()
472 struct dentry *lower_dentry; in ecryptfs_symlink() local
478 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_symlink()
489 rc = vfs_symlink(&nop_mnt_idmap, lower_dir, lower_dentry, in ecryptfs_symlink()
492 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_symlink()
494 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_symlink()
510 struct dentry *lower_dentry; in ecryptfs_mkdir() local
513 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_mkdir()
516 lower_dentry, mode); in ecryptfs_mkdir()
517 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mkdir()
519 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mkdir()
534 struct dentry *lower_dentry; in ecryptfs_rmdir() local
538 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_rmdir()
539 dget(lower_dentry); // don't even try to make the lower negative in ecryptfs_rmdir()
541 if (d_unhashed(lower_dentry)) in ecryptfs_rmdir()
544 rc = vfs_rmdir(&nop_mnt_idmap, lower_dir, lower_dentry); in ecryptfs_rmdir()
551 dput(lower_dentry); in ecryptfs_rmdir()
563 struct dentry *lower_dentry; in ecryptfs_mknod() local
566 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_mknod()
569 lower_dentry, mode, dev); in ecryptfs_mknod()
570 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mknod()
572 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mknod()
651 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_readlink_lower() local
656 link = vfs_get_link(lower_dentry, &done); in ecryptfs_readlink_lower()
864 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_truncate() local
866 inode_lock(d_inode(lower_dentry)); in ecryptfs_truncate()
867 rc = notify_change(&nop_mnt_idmap, lower_dentry, in ecryptfs_truncate()
869 inode_unlock(d_inode(lower_dentry)); in ecryptfs_truncate()
899 struct dentry *lower_dentry; in ecryptfs_setattr() local
913 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_setattr()
975 inode_lock(d_inode(lower_dentry)); in ecryptfs_setattr()
976 rc = notify_change(&nop_mnt_idmap, lower_dentry, &lower_ia, NULL); in ecryptfs_setattr()
977 inode_unlock(d_inode(lower_dentry)); in ecryptfs_setattr()
1043 struct dentry *lower_dentry; in ecryptfs_setxattr() local
1046 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_setxattr()
1047 lower_inode = d_inode(lower_dentry); in ecryptfs_setxattr()
1053 rc = __vfs_setxattr_locked(&nop_mnt_idmap, lower_dentry, name, value, size, flags, NULL); in ecryptfs_setxattr()
1062 ecryptfs_getxattr_lower(struct dentry *lower_dentry, struct inode *lower_inode, in ecryptfs_getxattr_lower() argument
1072 rc = __vfs_getxattr(lower_dentry, lower_inode, name, value, size); in ecryptfs_getxattr_lower()
1091 struct dentry *lower_dentry; in ecryptfs_listxattr() local
1093 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_listxattr()
1094 if (!d_inode(lower_dentry)->i_op->listxattr) { in ecryptfs_listxattr()
1098 inode_lock(d_inode(lower_dentry)); in ecryptfs_listxattr()
1099 rc = d_inode(lower_dentry)->i_op->listxattr(lower_dentry, list, size); in ecryptfs_listxattr()
1100 inode_unlock(d_inode(lower_dentry)); in ecryptfs_listxattr()
1109 struct dentry *lower_dentry; in ecryptfs_removexattr() local
1112 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_removexattr()
1119 rc = __vfs_removexattr(&nop_mnt_idmap, lower_dentry, name); in ecryptfs_removexattr()
1133 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_fileattr_set() local
1136 rc = vfs_fileattr_set(&nop_mnt_idmap, lower_dentry, fa); in ecryptfs_fileattr_set()
1137 fsstack_copy_attr_all(d_inode(dentry), d_inode(lower_dentry)); in ecryptfs_fileattr_set()
1154 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_set_acl() local
1155 struct inode *lower_inode = d_inode(lower_dentry); in ecryptfs_set_acl()
1157 rc = vfs_set_acl(&nop_mnt_idmap, lower_dentry, in ecryptfs_set_acl()