Lines Matching refs:lower_dentry

133 static int ecryptfs_interpose(struct dentry *lower_dentry,  in ecryptfs_interpose()  argument
136 struct inode *inode = ecryptfs_get_inode(d_inode(lower_dentry), sb); in ecryptfs_interpose()
148 struct dentry *lower_dentry; in ecryptfs_do_unlink() local
152 lower_dentry = ecryptfs_start_removing_dentry(dentry); in ecryptfs_do_unlink()
153 if (IS_ERR(lower_dentry)) in ecryptfs_do_unlink()
154 return PTR_ERR(lower_dentry); in ecryptfs_do_unlink()
156 lower_dir = lower_dentry->d_parent->d_inode; in ecryptfs_do_unlink()
157 rc = vfs_unlink(&nop_mnt_idmap, lower_dir, lower_dentry, NULL); in ecryptfs_do_unlink()
166 end_removing(lower_dentry); in ecryptfs_do_unlink()
189 struct dentry *lower_dentry; in ecryptfs_do_create() local
193 lower_dentry = ecryptfs_start_creating_dentry(ecryptfs_dentry); in ecryptfs_do_create()
194 if (IS_ERR(lower_dentry)) in ecryptfs_do_create()
195 return ERR_CAST(lower_dentry); in ecryptfs_do_create()
196 lower_dir = lower_dentry->d_parent->d_inode; in ecryptfs_do_create()
197 rc = vfs_create(&nop_mnt_idmap, lower_dentry, mode, NULL); in ecryptfs_do_create()
204 inode = __ecryptfs_get_inode(d_inode(lower_dentry), in ecryptfs_do_create()
207 vfs_unlink(&nop_mnt_idmap, lower_dir, lower_dentry, NULL); in ecryptfs_do_create()
213 end_creating(lower_dentry); in ecryptfs_do_create()
333 struct dentry *lower_dentry) in ecryptfs_lookup_interpose() argument
341 BUG_ON(!d_count(lower_dentry)); in ecryptfs_lookup_interpose()
343 ecryptfs_set_dentry_lower(dentry, lower_dentry); in ecryptfs_lookup_interpose()
351 lower_inode = READ_ONCE(lower_dentry->d_inode); in ecryptfs_lookup_interpose()
392 struct dentry *lower_dir_dentry, *lower_dentry; in ecryptfs_lookup() local
416 lower_dentry = lookup_noperm_unlocked(&qname, lower_dir_dentry); in ecryptfs_lookup()
417 if (IS_ERR(lower_dentry)) { in ecryptfs_lookup()
420 PTR_ERR(lower_dentry), in ecryptfs_lookup()
422 res = ERR_CAST(lower_dentry); in ecryptfs_lookup()
424 res = ecryptfs_lookup_interpose(ecryptfs_dentry, lower_dentry); in ecryptfs_lookup()
472 struct dentry *lower_dentry; in ecryptfs_symlink() local
478 lower_dentry = ecryptfs_start_creating_dentry(dentry); in ecryptfs_symlink()
479 if (IS_ERR(lower_dentry)) in ecryptfs_symlink()
480 return PTR_ERR(lower_dentry); in ecryptfs_symlink()
481 lower_dir = lower_dentry->d_parent->d_inode; 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()
502 end_creating(lower_dentry); in ecryptfs_symlink()
512 struct dentry *lower_dentry; in ecryptfs_mkdir() local
516 lower_dentry = ecryptfs_start_creating_dentry(dentry); in ecryptfs_mkdir()
517 if (IS_ERR(lower_dentry)) in ecryptfs_mkdir()
518 return lower_dentry; in ecryptfs_mkdir()
519 lower_dir_dentry = dget(lower_dentry->d_parent); in ecryptfs_mkdir()
521 lower_dentry = vfs_mkdir(&nop_mnt_idmap, lower_dir, in ecryptfs_mkdir()
522 lower_dentry, mode, NULL); in ecryptfs_mkdir()
523 rc = PTR_ERR(lower_dentry); in ecryptfs_mkdir()
524 if (IS_ERR(lower_dentry)) in ecryptfs_mkdir()
527 if (d_unhashed(lower_dentry)) in ecryptfs_mkdir()
529 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mkdir()
537 end_creating(lower_dentry); in ecryptfs_mkdir()
545 struct dentry *lower_dentry; in ecryptfs_rmdir() local
549 lower_dentry = ecryptfs_start_removing_dentry(dentry); in ecryptfs_rmdir()
550 if (IS_ERR(lower_dentry)) in ecryptfs_rmdir()
551 return PTR_ERR(lower_dentry); in ecryptfs_rmdir()
552 lower_dir = lower_dentry->d_parent->d_inode; in ecryptfs_rmdir()
554 rc = vfs_rmdir(&nop_mnt_idmap, lower_dir, lower_dentry, NULL); in ecryptfs_rmdir()
560 end_removing(lower_dentry); in ecryptfs_rmdir()
571 struct dentry *lower_dentry; in ecryptfs_mknod() local
574 lower_dentry = ecryptfs_start_creating_dentry(dentry); in ecryptfs_mknod()
575 if (IS_ERR(lower_dentry)) in ecryptfs_mknod()
576 return PTR_ERR(lower_dentry); in ecryptfs_mknod()
577 lower_dir = lower_dentry->d_parent->d_inode; in ecryptfs_mknod()
579 rc = vfs_mknod(&nop_mnt_idmap, lower_dir, lower_dentry, mode, dev, NULL); in ecryptfs_mknod()
580 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mknod()
582 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mknod()
588 end_creating(lower_dentry); in ecryptfs_mknod()
642 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_readlink_lower() local
647 link = vfs_get_link(lower_dentry, &done); in ecryptfs_readlink_lower()
855 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_truncate() local
857 inode_lock(d_inode(lower_dentry)); in ecryptfs_truncate()
858 rc = notify_change(&nop_mnt_idmap, lower_dentry, in ecryptfs_truncate()
860 inode_unlock(d_inode(lower_dentry)); in ecryptfs_truncate()
890 struct dentry *lower_dentry; in ecryptfs_setattr() local
901 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_setattr()
963 inode_lock(d_inode(lower_dentry)); in ecryptfs_setattr()
964 rc = notify_change(&nop_mnt_idmap, lower_dentry, &lower_ia, NULL); in ecryptfs_setattr()
965 inode_unlock(d_inode(lower_dentry)); in ecryptfs_setattr()
1023 struct dentry *lower_dentry; in ecryptfs_setxattr() local
1026 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_setxattr()
1027 lower_inode = d_inode(lower_dentry); in ecryptfs_setxattr()
1033 rc = __vfs_setxattr_locked(&nop_mnt_idmap, lower_dentry, name, value, size, flags, NULL); in ecryptfs_setxattr()
1042 ecryptfs_getxattr_lower(struct dentry *lower_dentry, struct inode *lower_inode, in ecryptfs_getxattr_lower() argument
1052 rc = __vfs_getxattr(lower_dentry, lower_inode, name, value, size); in ecryptfs_getxattr_lower()
1071 struct dentry *lower_dentry; in ecryptfs_listxattr() local
1073 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_listxattr()
1074 if (!d_inode(lower_dentry)->i_op->listxattr) { in ecryptfs_listxattr()
1078 inode_lock(d_inode(lower_dentry)); in ecryptfs_listxattr()
1079 rc = d_inode(lower_dentry)->i_op->listxattr(lower_dentry, list, size); in ecryptfs_listxattr()
1080 inode_unlock(d_inode(lower_dentry)); in ecryptfs_listxattr()
1089 struct dentry *lower_dentry; in ecryptfs_removexattr() local
1092 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_removexattr()
1099 rc = __vfs_removexattr(&nop_mnt_idmap, lower_dentry, name); in ecryptfs_removexattr()
1113 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_fileattr_set() local
1116 rc = vfs_fileattr_set(&nop_mnt_idmap, lower_dentry, fa); in ecryptfs_fileattr_set()
1117 fsstack_copy_attr_all(d_inode(dentry), d_inode(lower_dentry)); in ecryptfs_fileattr_set()
1134 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_set_acl() local
1135 struct inode *lower_inode = d_inode(lower_dentry); in ecryptfs_set_acl()
1137 rc = vfs_set_acl(&nop_mnt_idmap, lower_dentry, in ecryptfs_set_acl()