• Home
  • Raw
  • Download

Lines Matching refs:dentry

39 static struct dentry *lock_parent(struct dentry *dentry)  in lock_parent()  argument
41 struct dentry *dir; in lock_parent()
43 dir = dget_parent(dentry); in lock_parent()
48 static void unlock_dir(struct dentry *dir) in unlock_dir()
131 static int ecryptfs_interpose(struct dentry *lower_dentry, in ecryptfs_interpose()
132 struct dentry *dentry, struct super_block *sb) in ecryptfs_interpose() argument
138 d_instantiate(dentry, inode); in ecryptfs_interpose()
143 static int ecryptfs_do_unlink(struct inode *dir, struct dentry *dentry, in ecryptfs_do_unlink() argument
146 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_do_unlink()
148 struct dentry *lower_dir_dentry; in ecryptfs_do_unlink()
161 d_drop(dentry); in ecryptfs_do_unlink()
182 struct dentry *ecryptfs_dentry, umode_t mode) in ecryptfs_do_create()
185 struct dentry *lower_dentry; in ecryptfs_do_create()
186 struct dentry *lower_dir_dentry; in ecryptfs_do_create()
219 int ecryptfs_initialize_file(struct dentry *ecryptfs_dentry, in ecryptfs_initialize_file()
265 ecryptfs_create(struct inode *directory_inode, struct dentry *ecryptfs_dentry, in ecryptfs_create()
295 static int ecryptfs_i_size_read(struct dentry *dentry, struct inode *inode) in ecryptfs_i_size_read() argument
300 rc = ecryptfs_get_lower_file(dentry, inode); in ecryptfs_i_size_read()
305 dentry, rc); in ecryptfs_i_size_read()
317 rc = ecryptfs_read_and_validate_xattr_region(dentry, inode); in ecryptfs_i_size_read()
329 static int ecryptfs_lookup_interpose(struct dentry *dentry, in ecryptfs_lookup_interpose() argument
330 struct dentry *lower_dentry, in ecryptfs_lookup_interpose()
333 struct path *path = ecryptfs_dentry_to_lower_path(dentry->d_parent); in ecryptfs_lookup_interpose()
347 fsstack_copy_attr_atime(dir_inode, d_inode(path->dentry)); in ecryptfs_lookup_interpose()
350 ecryptfs_set_dentry_private(dentry, dentry_info); in ecryptfs_lookup_interpose()
352 dentry_info->lower_path.dentry = lower_dentry; in ecryptfs_lookup_interpose()
364 d_add(dentry, NULL); in ecryptfs_lookup_interpose()
374 rc = ecryptfs_i_size_read(dentry, inode); in ecryptfs_lookup_interpose()
383 d_add(dentry, inode); in ecryptfs_lookup_interpose()
397 static struct dentry *ecryptfs_lookup(struct inode *ecryptfs_dir_inode, in ecryptfs_lookup()
398 struct dentry *ecryptfs_dentry, in ecryptfs_lookup()
404 struct dentry *lower_dir_dentry, *lower_dentry; in ecryptfs_lookup()
457 static int ecryptfs_link(struct dentry *old_dentry, struct inode *dir, in ecryptfs_link()
458 struct dentry *new_dentry) in ecryptfs_link()
460 struct dentry *lower_old_dentry; in ecryptfs_link()
461 struct dentry *lower_new_dentry; in ecryptfs_link()
462 struct dentry *lower_dir_dentry; in ecryptfs_link()
491 static int ecryptfs_unlink(struct inode *dir, struct dentry *dentry) in ecryptfs_unlink() argument
493 return ecryptfs_do_unlink(dir, dentry, d_inode(dentry)); in ecryptfs_unlink()
496 static int ecryptfs_symlink(struct inode *dir, struct dentry *dentry, in ecryptfs_symlink() argument
500 struct dentry *lower_dentry; in ecryptfs_symlink()
501 struct dentry *lower_dir_dentry; in ecryptfs_symlink()
506 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_symlink()
523 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_symlink()
531 if (d_really_is_negative(dentry)) in ecryptfs_symlink()
532 d_drop(dentry); in ecryptfs_symlink()
536 static int ecryptfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) in ecryptfs_mkdir() argument
539 struct dentry *lower_dentry; in ecryptfs_mkdir()
540 struct dentry *lower_dir_dentry; in ecryptfs_mkdir()
542 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_mkdir()
547 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mkdir()
555 if (d_really_is_negative(dentry)) in ecryptfs_mkdir()
556 d_drop(dentry); in ecryptfs_mkdir()
560 static int ecryptfs_rmdir(struct inode *dir, struct dentry *dentry) in ecryptfs_rmdir() argument
562 struct dentry *lower_dentry; in ecryptfs_rmdir()
563 struct dentry *lower_dir_dentry; in ecryptfs_rmdir()
566 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_rmdir()
567 dget(dentry); in ecryptfs_rmdir()
572 if (!rc && d_really_is_positive(dentry)) in ecryptfs_rmdir()
573 clear_nlink(d_inode(dentry)); in ecryptfs_rmdir()
578 d_drop(dentry); in ecryptfs_rmdir()
579 dput(dentry); in ecryptfs_rmdir()
584 ecryptfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev) in ecryptfs_mknod() argument
587 struct dentry *lower_dentry; in ecryptfs_mknod()
588 struct dentry *lower_dir_dentry; in ecryptfs_mknod()
590 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_mknod()
595 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mknod()
602 if (d_really_is_negative(dentry)) in ecryptfs_mknod()
603 d_drop(dentry); in ecryptfs_mknod()
608 ecryptfs_rename(struct inode *old_dir, struct dentry *old_dentry, in ecryptfs_rename()
609 struct inode *new_dir, struct dentry *new_dentry) in ecryptfs_rename()
612 struct dentry *lower_old_dentry; in ecryptfs_rename()
613 struct dentry *lower_new_dentry; in ecryptfs_rename()
614 struct dentry *lower_old_dir_dentry; in ecryptfs_rename()
615 struct dentry *lower_new_dir_dentry; in ecryptfs_rename()
616 struct dentry *trap = NULL; in ecryptfs_rename()
657 static char *ecryptfs_readlink_lower(struct dentry *dentry, size_t *bufsiz) in ecryptfs_readlink_lower() argument
659 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_readlink_lower()
676 rc = ecryptfs_decode_and_decrypt_filename(&buf, bufsiz, dentry->d_sb, in ecryptfs_readlink_lower()
683 static const char *ecryptfs_follow_link(struct dentry *dentry, void **cookie) in ecryptfs_follow_link() argument
686 char *buf = ecryptfs_readlink_lower(dentry, &len); in ecryptfs_follow_link()
689 fsstack_copy_attr_atime(d_inode(dentry), in ecryptfs_follow_link()
690 d_inode(ecryptfs_dentry_to_lower(dentry))); in ecryptfs_follow_link()
740 static int truncate_upper(struct dentry *dentry, struct iattr *ia, in truncate_upper() argument
744 struct inode *inode = d_inode(dentry); in truncate_upper()
754 rc = ecryptfs_get_lower_file(dentry, inode); in truncate_upper()
757 crypt_stat = &ecryptfs_inode_to_private(d_inode(dentry))->crypt_stat; in truncate_upper()
858 int ecryptfs_truncate(struct dentry *dentry, loff_t new_length) in ecryptfs_truncate() argument
864 rc = ecryptfs_inode_newsize_ok(d_inode(dentry), new_length); in ecryptfs_truncate()
868 rc = truncate_upper(dentry, &ia, &lower_ia); in ecryptfs_truncate()
870 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_truncate()
897 static int ecryptfs_setattr(struct dentry *dentry, struct iattr *ia) in ecryptfs_setattr() argument
900 struct dentry *lower_dentry; in ecryptfs_setattr()
906 crypt_stat = &ecryptfs_inode_to_private(d_inode(dentry))->crypt_stat; in ecryptfs_setattr()
909 inode = d_inode(dentry); in ecryptfs_setattr()
911 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_setattr()
913 if (d_is_dir(dentry)) in ecryptfs_setattr()
915 else if (d_is_reg(dentry) in ecryptfs_setattr()
921 dentry->d_sb)->mount_crypt_stat; in ecryptfs_setattr()
922 rc = ecryptfs_get_lower_file(dentry, inode); in ecryptfs_setattr()
927 rc = ecryptfs_read_metadata(dentry); in ecryptfs_setattr()
961 rc = truncate_upper(dentry, ia, &lower_ia); in ecryptfs_setattr()
981 static int ecryptfs_getattr_link(struct vfsmount *mnt, struct dentry *dentry, in ecryptfs_getattr_link() argument
988 dentry->d_sb)->mount_crypt_stat; in ecryptfs_getattr_link()
989 generic_fillattr(d_inode(dentry), stat); in ecryptfs_getattr_link()
994 target = ecryptfs_readlink_lower(dentry, &targetsiz); in ecryptfs_getattr_link()
1005 static int ecryptfs_getattr(struct vfsmount *mnt, struct dentry *dentry, in ecryptfs_getattr() argument
1011 rc = vfs_getattr(ecryptfs_dentry_to_lower_path(dentry), &lower_stat); in ecryptfs_getattr()
1013 fsstack_copy_attr_all(d_inode(dentry), in ecryptfs_getattr()
1014 ecryptfs_inode_to_lower(d_inode(dentry))); in ecryptfs_getattr()
1015 generic_fillattr(d_inode(dentry), stat); in ecryptfs_getattr()
1022 ecryptfs_setxattr(struct dentry *dentry, const char *name, const void *value, in ecryptfs_setxattr() argument
1026 struct dentry *lower_dentry; in ecryptfs_setxattr()
1028 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_setxattr()
1035 if (!rc && d_really_is_positive(dentry)) in ecryptfs_setxattr()
1036 fsstack_copy_attr_all(d_inode(dentry), d_inode(lower_dentry)); in ecryptfs_setxattr()
1042 ecryptfs_getxattr_lower(struct dentry *lower_dentry, const char *name, in ecryptfs_getxattr_lower()
1060 ecryptfs_getxattr(struct dentry *dentry, const char *name, void *value, in ecryptfs_getxattr() argument
1063 return ecryptfs_getxattr_lower(ecryptfs_dentry_to_lower(dentry), name, in ecryptfs_getxattr()
1068 ecryptfs_listxattr(struct dentry *dentry, char *list, size_t size) in ecryptfs_listxattr() argument
1071 struct dentry *lower_dentry; in ecryptfs_listxattr()
1073 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_listxattr()
1085 static int ecryptfs_removexattr(struct dentry *dentry, const char *name) in ecryptfs_removexattr() argument
1088 struct dentry *lower_dentry; in ecryptfs_removexattr()
1090 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_removexattr()