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()
186 struct dentry *lower_dentry; in ecryptfs_do_create() local
190 lower_dentry = ecryptfs_dentry_to_lower(ecryptfs_dentry); in ecryptfs_do_create()
191 lower_dir_dentry = lock_parent(lower_dentry); in ecryptfs_do_create()
192 rc = vfs_create(d_inode(lower_dir_dentry), lower_dentry, mode, true); in ecryptfs_do_create()
199 inode = __ecryptfs_get_inode(d_inode(lower_dentry), in ecryptfs_do_create()
202 vfs_unlink(d_inode(lower_dir_dentry), lower_dentry, NULL); in ecryptfs_do_create()
332 struct dentry *lower_dentry, in ecryptfs_lookup_interpose() argument
335 struct inode *inode, *lower_inode = d_inode(lower_dentry); in ecryptfs_lookup_interpose()
345 dput(lower_dentry); in ecryptfs_lookup_interpose()
350 fsstack_copy_attr_atime(dir_inode, d_inode(lower_dentry->d_parent)); in ecryptfs_lookup_interpose()
351 BUG_ON(!d_count(lower_dentry)); in ecryptfs_lookup_interpose()
355 dentry_info->lower_path.dentry = lower_dentry; in ecryptfs_lookup_interpose()
357 if (d_really_is_negative(lower_dentry)) { in ecryptfs_lookup_interpose()
399 struct dentry *lower_dir_dentry, *lower_dentry; in ecryptfs_lookup() local
404 lower_dentry = lookup_one_len(ecryptfs_dentry->d_name.name, in ecryptfs_lookup()
408 if (IS_ERR(lower_dentry)) { in ecryptfs_lookup()
409 rc = PTR_ERR(lower_dentry); in ecryptfs_lookup()
415 if (d_really_is_positive(lower_dentry)) in ecryptfs_lookup()
422 dput(lower_dentry); in ecryptfs_lookup()
433 lower_dentry = lookup_one_len(encrypted_and_encoded_name, in ecryptfs_lookup()
437 if (IS_ERR(lower_dentry)) { in ecryptfs_lookup()
438 rc = PTR_ERR(lower_dentry); in ecryptfs_lookup()
445 rc = ecryptfs_lookup_interpose(ecryptfs_dentry, lower_dentry, in ecryptfs_lookup()
495 struct dentry *lower_dentry; in ecryptfs_symlink() local
501 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_symlink()
502 dget(lower_dentry); in ecryptfs_symlink()
503 lower_dir_dentry = lock_parent(lower_dentry); in ecryptfs_symlink()
513 rc = vfs_symlink(d_inode(lower_dir_dentry), lower_dentry, in ecryptfs_symlink()
516 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_symlink()
518 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_symlink()
525 dput(lower_dentry); in ecryptfs_symlink()
534 struct dentry *lower_dentry; in ecryptfs_mkdir() local
537 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_mkdir()
538 lower_dir_dentry = lock_parent(lower_dentry); in ecryptfs_mkdir()
539 rc = vfs_mkdir(d_inode(lower_dir_dentry), lower_dentry, mode); in ecryptfs_mkdir()
540 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mkdir()
542 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mkdir()
557 struct dentry *lower_dentry; in ecryptfs_rmdir() local
561 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_rmdir()
563 lower_dir_dentry = lock_parent(lower_dentry); in ecryptfs_rmdir()
564 dget(lower_dentry); in ecryptfs_rmdir()
565 rc = vfs_rmdir(d_inode(lower_dir_dentry), lower_dentry); in ecryptfs_rmdir()
566 dput(lower_dentry); in ecryptfs_rmdir()
582 struct dentry *lower_dentry; in ecryptfs_mknod() local
585 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_mknod()
586 lower_dir_dentry = lock_parent(lower_dentry); in ecryptfs_mknod()
587 rc = vfs_mknod(d_inode(lower_dir_dentry), lower_dentry, mode, dev); in ecryptfs_mknod()
588 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mknod()
590 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mknod()
654 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_readlink_lower() local
665 rc = d_inode(lower_dentry)->i_op->readlink(lower_dentry, in ecryptfs_readlink_lower()
867 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_truncate() local
869 mutex_lock(&d_inode(lower_dentry)->i_mutex); in ecryptfs_truncate()
870 rc = notify_change(lower_dentry, &lower_ia, NULL); in ecryptfs_truncate()
871 mutex_unlock(&d_inode(lower_dentry)->i_mutex); in ecryptfs_truncate()
897 struct dentry *lower_dentry; in ecryptfs_setattr() local
908 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_setattr()
970 mutex_lock(&d_inode(lower_dentry)->i_mutex); in ecryptfs_setattr()
971 rc = notify_change(lower_dentry, &lower_ia, NULL); in ecryptfs_setattr()
972 mutex_unlock(&d_inode(lower_dentry)->i_mutex); in ecryptfs_setattr()
1023 struct dentry *lower_dentry; in ecryptfs_setxattr() local
1025 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_setxattr()
1026 if (!d_inode(lower_dentry)->i_op->setxattr) { in ecryptfs_setxattr()
1031 rc = vfs_setxattr(lower_dentry, name, value, size, flags); in ecryptfs_setxattr()
1033 fsstack_copy_attr_all(d_inode(dentry), d_inode(lower_dentry)); in ecryptfs_setxattr()
1039 ecryptfs_getxattr_lower(struct dentry *lower_dentry, const char *name, in ecryptfs_getxattr_lower() argument
1044 if (!d_inode(lower_dentry)->i_op->getxattr) { in ecryptfs_getxattr_lower()
1048 mutex_lock(&d_inode(lower_dentry)->i_mutex); in ecryptfs_getxattr_lower()
1049 rc = d_inode(lower_dentry)->i_op->getxattr(lower_dentry, name, value, in ecryptfs_getxattr_lower()
1051 mutex_unlock(&d_inode(lower_dentry)->i_mutex); in ecryptfs_getxattr_lower()
1068 struct dentry *lower_dentry; in ecryptfs_listxattr() local
1070 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_listxattr()
1071 if (!d_inode(lower_dentry)->i_op->listxattr) { in ecryptfs_listxattr()
1075 mutex_lock(&d_inode(lower_dentry)->i_mutex); in ecryptfs_listxattr()
1076 rc = d_inode(lower_dentry)->i_op->listxattr(lower_dentry, list, size); in ecryptfs_listxattr()
1077 mutex_unlock(&d_inode(lower_dentry)->i_mutex); in ecryptfs_listxattr()
1085 struct dentry *lower_dentry; in ecryptfs_removexattr() local
1087 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_removexattr()
1088 if (!d_inode(lower_dentry)->i_op->removexattr) { in ecryptfs_removexattr()
1092 mutex_lock(&d_inode(lower_dentry)->i_mutex); in ecryptfs_removexattr()
1093 rc = d_inode(lower_dentry)->i_op->removexattr(lower_dentry, name); in ecryptfs_removexattr()
1094 mutex_unlock(&d_inode(lower_dentry)->i_mutex); in ecryptfs_removexattr()