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
420 lower_dentry = lookup_noperm_unlocked(&qname, lower_dir_dentry); in ecryptfs_lookup()
421 if (IS_ERR(lower_dentry)) { in ecryptfs_lookup()
424 PTR_ERR(lower_dentry), in ecryptfs_lookup()
426 res = ERR_CAST(lower_dentry); in ecryptfs_lookup()
428 res = ecryptfs_lookup_interpose(ecryptfs_dentry, lower_dentry); in ecryptfs_lookup()
474 struct dentry *lower_dentry; in ecryptfs_symlink() local
480 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_symlink()
491 rc = vfs_symlink(&nop_mnt_idmap, lower_dir, lower_dentry, in ecryptfs_symlink()
494 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_symlink()
496 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_symlink()
512 struct dentry *lower_dentry; in ecryptfs_mkdir() local
515 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_mkdir()
519 lower_dentry = vfs_mkdir(&nop_mnt_idmap, lower_dir, in ecryptfs_mkdir()
520 lower_dentry, mode); in ecryptfs_mkdir()
521 rc = PTR_ERR(lower_dentry); in ecryptfs_mkdir()
522 if (IS_ERR(lower_dentry)) in ecryptfs_mkdir()
525 if (d_unhashed(lower_dentry)) in ecryptfs_mkdir()
527 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mkdir()
542 struct dentry *lower_dentry; in ecryptfs_rmdir() local
546 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_rmdir()
547 dget(lower_dentry); // don't even try to make the lower negative in ecryptfs_rmdir()
549 if (d_unhashed(lower_dentry)) in ecryptfs_rmdir()
552 rc = vfs_rmdir(&nop_mnt_idmap, lower_dir, lower_dentry); in ecryptfs_rmdir()
559 dput(lower_dentry); in ecryptfs_rmdir()
571 struct dentry *lower_dentry; in ecryptfs_mknod() local
574 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_mknod()
577 lower_dentry, mode, dev); in ecryptfs_mknod()
578 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mknod()
580 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mknod()
661 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_readlink_lower() local
666 link = vfs_get_link(lower_dentry, &done); in ecryptfs_readlink_lower()
874 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_truncate() local
876 inode_lock(d_inode(lower_dentry)); in ecryptfs_truncate()
877 rc = notify_change(&nop_mnt_idmap, lower_dentry, in ecryptfs_truncate()
879 inode_unlock(d_inode(lower_dentry)); in ecryptfs_truncate()
909 struct dentry *lower_dentry; in ecryptfs_setattr() local
923 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_setattr()
985 inode_lock(d_inode(lower_dentry)); in ecryptfs_setattr()
986 rc = notify_change(&nop_mnt_idmap, lower_dentry, &lower_ia, NULL); in ecryptfs_setattr()
987 inode_unlock(d_inode(lower_dentry)); in ecryptfs_setattr()
1045 struct dentry *lower_dentry; in ecryptfs_setxattr() local
1048 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_setxattr()
1049 lower_inode = d_inode(lower_dentry); in ecryptfs_setxattr()
1055 rc = __vfs_setxattr_locked(&nop_mnt_idmap, lower_dentry, name, value, size, flags, NULL); in ecryptfs_setxattr()
1064 ecryptfs_getxattr_lower(struct dentry *lower_dentry, struct inode *lower_inode, in ecryptfs_getxattr_lower() argument
1074 rc = __vfs_getxattr(lower_dentry, lower_inode, name, value, size); in ecryptfs_getxattr_lower()
1093 struct dentry *lower_dentry; in ecryptfs_listxattr() local
1095 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_listxattr()
1096 if (!d_inode(lower_dentry)->i_op->listxattr) { in ecryptfs_listxattr()
1100 inode_lock(d_inode(lower_dentry)); in ecryptfs_listxattr()
1101 rc = d_inode(lower_dentry)->i_op->listxattr(lower_dentry, list, size); in ecryptfs_listxattr()
1102 inode_unlock(d_inode(lower_dentry)); in ecryptfs_listxattr()
1111 struct dentry *lower_dentry; in ecryptfs_removexattr() local
1114 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_removexattr()
1121 rc = __vfs_removexattr(&nop_mnt_idmap, lower_dentry, name); in ecryptfs_removexattr()
1135 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_fileattr_set() local
1138 rc = vfs_fileattr_set(&nop_mnt_idmap, lower_dentry, fa); in ecryptfs_fileattr_set()
1139 fsstack_copy_attr_all(d_inode(dentry), d_inode(lower_dentry)); in ecryptfs_fileattr_set()
1156 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_set_acl() local
1157 struct inode *lower_inode = d_inode(lower_dentry); in ecryptfs_set_acl()
1159 rc = vfs_set_acl(&nop_mnt_idmap, lower_dentry, in ecryptfs_set_acl()