Lines Matching refs:lower_dentry

26 		       struct dentry **lower_dentry,  in lock_parent()  argument
33 *lower_dentry = ecryptfs_dentry_to_lower(dentry); in lock_parent()
36 return (*lower_dentry)->d_parent == lower_dir_dentry ? 0 : -EINVAL; in lock_parent()
115 static int ecryptfs_interpose(struct dentry *lower_dentry, in ecryptfs_interpose() argument
118 struct inode *inode = ecryptfs_get_inode(d_inode(lower_dentry), sb); in ecryptfs_interpose()
130 struct dentry *lower_dentry; in ecryptfs_do_unlink() local
134 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_do_unlink()
135 dget(lower_dentry); // don't even try to make the lower negative in ecryptfs_do_unlink()
137 if (d_unhashed(lower_dentry)) in ecryptfs_do_unlink()
140 rc = vfs_unlink(&init_user_ns, lower_dir, lower_dentry, in ecryptfs_do_unlink()
151 dput(lower_dentry); in ecryptfs_do_unlink()
175 struct dentry *lower_dentry; in ecryptfs_do_create() local
179 rc = lock_parent(ecryptfs_dentry, &lower_dentry, &lower_dir); in ecryptfs_do_create()
182 lower_dentry, mode, true); in ecryptfs_do_create()
189 inode = __ecryptfs_get_inode(d_inode(lower_dentry), in ecryptfs_do_create()
192 vfs_unlink(&init_user_ns, lower_dir, lower_dentry, NULL); in ecryptfs_do_create()
318 struct dentry *lower_dentry) in ecryptfs_lookup_interpose() argument
327 dput(lower_dentry); in ecryptfs_lookup_interpose()
333 BUG_ON(!d_count(lower_dentry)); in ecryptfs_lookup_interpose()
337 dentry_info->lower_path.dentry = lower_dentry; in ecryptfs_lookup_interpose()
345 lower_inode = READ_ONCE(lower_dentry->d_inode); in ecryptfs_lookup_interpose()
386 struct dentry *lower_dir_dentry, *lower_dentry; in ecryptfs_lookup() local
408 lower_dentry = lookup_one_len_unlocked(name, lower_dir_dentry, len); in ecryptfs_lookup()
409 if (IS_ERR(lower_dentry)) { in ecryptfs_lookup()
412 PTR_ERR(lower_dentry), in ecryptfs_lookup()
414 res = ERR_CAST(lower_dentry); in ecryptfs_lookup()
416 res = ecryptfs_lookup_interpose(ecryptfs_dentry, lower_dentry); in ecryptfs_lookup()
462 struct dentry *lower_dentry; in ecryptfs_symlink() local
468 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_symlink()
479 rc = vfs_symlink(&init_user_ns, lower_dir, lower_dentry, in ecryptfs_symlink()
482 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_symlink()
484 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_symlink()
500 struct dentry *lower_dentry; in ecryptfs_mkdir() local
503 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_mkdir()
506 lower_dentry, mode); in ecryptfs_mkdir()
507 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mkdir()
509 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mkdir()
524 struct dentry *lower_dentry; in ecryptfs_rmdir() local
528 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_rmdir()
529 dget(lower_dentry); // don't even try to make the lower negative in ecryptfs_rmdir()
531 if (d_unhashed(lower_dentry)) in ecryptfs_rmdir()
534 rc = vfs_rmdir(&init_user_ns, lower_dir, lower_dentry); in ecryptfs_rmdir()
541 dput(lower_dentry); in ecryptfs_rmdir()
553 struct dentry *lower_dentry; in ecryptfs_mknod() local
556 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_mknod()
559 lower_dentry, mode, dev); in ecryptfs_mknod()
560 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mknod()
562 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mknod()
641 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_readlink_lower() local
646 link = vfs_get_link(lower_dentry, &done); in ecryptfs_readlink_lower()
854 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_truncate() local
856 inode_lock(d_inode(lower_dentry)); in ecryptfs_truncate()
857 rc = notify_change(&init_user_ns, lower_dentry, in ecryptfs_truncate()
859 inode_unlock(d_inode(lower_dentry)); in ecryptfs_truncate()
889 struct dentry *lower_dentry; in ecryptfs_setattr() local
903 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_setattr()
965 inode_lock(d_inode(lower_dentry)); in ecryptfs_setattr()
966 rc = notify_change(&init_user_ns, lower_dentry, &lower_ia, NULL); in ecryptfs_setattr()
967 inode_unlock(d_inode(lower_dentry)); in ecryptfs_setattr()
1024 struct dentry *lower_dentry; in ecryptfs_setxattr() local
1027 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_setxattr()
1028 lower_inode = d_inode(lower_dentry); in ecryptfs_setxattr()
1034 rc = __vfs_setxattr_locked(&init_user_ns, lower_dentry, name, value, size, flags, NULL); in ecryptfs_setxattr()
1043 ecryptfs_getxattr_lower(struct dentry *lower_dentry, struct inode *lower_inode, in ecryptfs_getxattr_lower() argument
1053 rc = __vfs_getxattr(lower_dentry, lower_inode, name, value, size); in ecryptfs_getxattr_lower()
1072 struct dentry *lower_dentry; in ecryptfs_listxattr() local
1074 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_listxattr()
1075 if (!d_inode(lower_dentry)->i_op->listxattr) { in ecryptfs_listxattr()
1079 inode_lock(d_inode(lower_dentry)); in ecryptfs_listxattr()
1080 rc = d_inode(lower_dentry)->i_op->listxattr(lower_dentry, list, size); in ecryptfs_listxattr()
1081 inode_unlock(d_inode(lower_dentry)); in ecryptfs_listxattr()
1090 struct dentry *lower_dentry; in ecryptfs_removexattr() local
1093 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_removexattr()
1100 rc = __vfs_removexattr(&init_user_ns, lower_dentry, name); in ecryptfs_removexattr()
1114 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_fileattr_set() local
1117 rc = vfs_fileattr_set(&init_user_ns, lower_dentry, fa); in ecryptfs_fileattr_set()
1118 fsstack_copy_attr_all(d_inode(dentry), d_inode(lower_dentry)); in ecryptfs_fileattr_set()