Lines Matching refs:lower_dentry
131 static int ecryptfs_interpose(struct dentry *lower_dentry, in ecryptfs_interpose() argument
134 struct inode *inode = ecryptfs_get_inode(d_inode(lower_dentry), sb); in ecryptfs_interpose()
146 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_do_unlink() local
151 dget(lower_dentry); in ecryptfs_do_unlink()
152 lower_dir_dentry = lock_parent(lower_dentry); in ecryptfs_do_unlink()
153 rc = vfs_unlink(lower_dir_inode, lower_dentry, NULL); in ecryptfs_do_unlink()
164 dput(lower_dentry); in ecryptfs_do_unlink()
185 struct dentry *lower_dentry; in ecryptfs_do_create() local
189 lower_dentry = ecryptfs_dentry_to_lower(ecryptfs_dentry); in ecryptfs_do_create()
190 lower_dir_dentry = lock_parent(lower_dentry); in ecryptfs_do_create()
191 rc = vfs_create(d_inode(lower_dir_dentry), lower_dentry, mode, true); in ecryptfs_do_create()
198 inode = __ecryptfs_get_inode(d_inode(lower_dentry), in ecryptfs_do_create()
201 vfs_unlink(d_inode(lower_dir_dentry), lower_dentry, NULL); in ecryptfs_do_create()
331 struct dentry *lower_dentry, in ecryptfs_lookup_interpose() argument
334 struct inode *inode, *lower_inode = d_inode(lower_dentry); in ecryptfs_lookup_interpose()
344 dput(lower_dentry); in ecryptfs_lookup_interpose()
349 fsstack_copy_attr_atime(dir_inode, d_inode(lower_dentry->d_parent)); in ecryptfs_lookup_interpose()
350 BUG_ON(!d_count(lower_dentry)); in ecryptfs_lookup_interpose()
354 dentry_info->lower_path.dentry = lower_dentry; in ecryptfs_lookup_interpose()
356 if (d_really_is_negative(lower_dentry)) { in ecryptfs_lookup_interpose()
398 struct dentry *lower_dir_dentry, *lower_dentry; in ecryptfs_lookup() local
403 lower_dentry = lookup_one_len(ecryptfs_dentry->d_name.name, in ecryptfs_lookup()
407 if (IS_ERR(lower_dentry)) { in ecryptfs_lookup()
408 rc = PTR_ERR(lower_dentry); in ecryptfs_lookup()
414 if (d_really_is_positive(lower_dentry)) in ecryptfs_lookup()
421 dput(lower_dentry); in ecryptfs_lookup()
432 lower_dentry = lookup_one_len(encrypted_and_encoded_name, in ecryptfs_lookup()
436 if (IS_ERR(lower_dentry)) { in ecryptfs_lookup()
437 rc = PTR_ERR(lower_dentry); in ecryptfs_lookup()
444 rc = ecryptfs_lookup_interpose(ecryptfs_dentry, lower_dentry, in ecryptfs_lookup()
494 struct dentry *lower_dentry; in ecryptfs_symlink() local
500 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_symlink()
501 dget(lower_dentry); in ecryptfs_symlink()
502 lower_dir_dentry = lock_parent(lower_dentry); in ecryptfs_symlink()
512 rc = vfs_symlink(d_inode(lower_dir_dentry), lower_dentry, in ecryptfs_symlink()
515 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_symlink()
517 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_symlink()
524 dput(lower_dentry); in ecryptfs_symlink()
533 struct dentry *lower_dentry; in ecryptfs_mkdir() local
536 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_mkdir()
537 lower_dir_dentry = lock_parent(lower_dentry); in ecryptfs_mkdir()
538 rc = vfs_mkdir(d_inode(lower_dir_dentry), lower_dentry, mode); in ecryptfs_mkdir()
539 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mkdir()
541 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mkdir()
556 struct dentry *lower_dentry; in ecryptfs_rmdir() local
560 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_rmdir()
562 lower_dir_dentry = lock_parent(lower_dentry); in ecryptfs_rmdir()
563 dget(lower_dentry); in ecryptfs_rmdir()
564 rc = vfs_rmdir(d_inode(lower_dir_dentry), lower_dentry); in ecryptfs_rmdir()
565 dput(lower_dentry); in ecryptfs_rmdir()
581 struct dentry *lower_dentry; in ecryptfs_mknod() local
584 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_mknod()
585 lower_dir_dentry = lock_parent(lower_dentry); in ecryptfs_mknod()
586 rc = vfs_mknod(d_inode(lower_dir_dentry), lower_dentry, mode, dev); in ecryptfs_mknod()
587 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mknod()
589 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mknod()
653 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_readlink_lower() local
664 rc = d_inode(lower_dentry)->i_op->readlink(lower_dentry, in ecryptfs_readlink_lower()
864 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_truncate() local
866 mutex_lock(&d_inode(lower_dentry)->i_mutex); in ecryptfs_truncate()
867 rc = notify_change(lower_dentry, &lower_ia, NULL); in ecryptfs_truncate()
868 mutex_unlock(&d_inode(lower_dentry)->i_mutex); in ecryptfs_truncate()
894 struct dentry *lower_dentry; in ecryptfs_setattr() local
905 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_setattr()
967 mutex_lock(&d_inode(lower_dentry)->i_mutex); in ecryptfs_setattr()
968 rc = notify_change(lower_dentry, &lower_ia, NULL); in ecryptfs_setattr()
969 mutex_unlock(&d_inode(lower_dentry)->i_mutex); in ecryptfs_setattr()
1020 struct dentry *lower_dentry; in ecryptfs_setxattr() local
1022 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_setxattr()
1023 if (!d_inode(lower_dentry)->i_op->setxattr) { in ecryptfs_setxattr()
1028 rc = vfs_setxattr(lower_dentry, name, value, size, flags); in ecryptfs_setxattr()
1030 fsstack_copy_attr_all(d_inode(dentry), d_inode(lower_dentry)); in ecryptfs_setxattr()
1036 ecryptfs_getxattr_lower(struct dentry *lower_dentry, const char *name, in ecryptfs_getxattr_lower() argument
1041 if (!d_inode(lower_dentry)->i_op->getxattr) { in ecryptfs_getxattr_lower()
1045 mutex_lock(&d_inode(lower_dentry)->i_mutex); in ecryptfs_getxattr_lower()
1046 rc = d_inode(lower_dentry)->i_op->getxattr(lower_dentry, name, value, in ecryptfs_getxattr_lower()
1048 mutex_unlock(&d_inode(lower_dentry)->i_mutex); in ecryptfs_getxattr_lower()
1065 struct dentry *lower_dentry; in ecryptfs_listxattr() local
1067 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_listxattr()
1068 if (!d_inode(lower_dentry)->i_op->listxattr) { in ecryptfs_listxattr()
1072 mutex_lock(&d_inode(lower_dentry)->i_mutex); in ecryptfs_listxattr()
1073 rc = d_inode(lower_dentry)->i_op->listxattr(lower_dentry, list, size); in ecryptfs_listxattr()
1074 mutex_unlock(&d_inode(lower_dentry)->i_mutex); in ecryptfs_listxattr()
1082 struct dentry *lower_dentry; in ecryptfs_removexattr() local
1084 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_removexattr()
1085 if (!d_inode(lower_dentry)->i_op->removexattr) { in ecryptfs_removexattr()
1089 mutex_lock(&d_inode(lower_dentry)->i_mutex); in ecryptfs_removexattr()
1090 rc = d_inode(lower_dentry)->i_op->removexattr(lower_dentry, name); in ecryptfs_removexattr()
1091 mutex_unlock(&d_inode(lower_dentry)->i_mutex); in ecryptfs_removexattr()