Lines Matching refs:lower_dentry
129 static int ecryptfs_interpose(struct dentry *lower_dentry, in ecryptfs_interpose() argument
132 struct inode *inode = ecryptfs_get_inode(d_inode(lower_dentry), sb); in ecryptfs_interpose()
144 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_do_unlink() local
149 dget(lower_dentry); in ecryptfs_do_unlink()
150 lower_dir_dentry = lock_parent(lower_dentry); in ecryptfs_do_unlink()
151 rc = vfs_unlink(lower_dir_inode, lower_dentry, NULL); in ecryptfs_do_unlink()
162 dput(lower_dentry); in ecryptfs_do_unlink()
183 struct dentry *lower_dentry; in ecryptfs_do_create() local
187 lower_dentry = ecryptfs_dentry_to_lower(ecryptfs_dentry); in ecryptfs_do_create()
188 lower_dir_dentry = lock_parent(lower_dentry); in ecryptfs_do_create()
189 rc = vfs_create(d_inode(lower_dir_dentry), lower_dentry, mode, true); in ecryptfs_do_create()
196 inode = __ecryptfs_get_inode(d_inode(lower_dentry), in ecryptfs_do_create()
199 vfs_unlink(d_inode(lower_dir_dentry), lower_dentry, NULL); in ecryptfs_do_create()
326 struct dentry *lower_dentry) in ecryptfs_lookup_interpose() argument
328 struct inode *inode, *lower_inode = d_inode(lower_dentry); in ecryptfs_lookup_interpose()
335 dput(lower_dentry); in ecryptfs_lookup_interpose()
341 d_inode(lower_dentry->d_parent)); in ecryptfs_lookup_interpose()
342 BUG_ON(!d_count(lower_dentry)); in ecryptfs_lookup_interpose()
346 dentry_info->lower_path.dentry = lower_dentry; in ecryptfs_lookup_interpose()
348 if (d_really_is_negative(lower_dentry)) { in ecryptfs_lookup_interpose()
387 struct dentry *lower_dir_dentry, *lower_dentry; in ecryptfs_lookup() local
409 lower_dentry = lookup_one_len_unlocked(name, lower_dir_dentry, len); in ecryptfs_lookup()
410 if (IS_ERR(lower_dentry)) { in ecryptfs_lookup()
413 PTR_ERR(lower_dentry), in ecryptfs_lookup()
415 res = ERR_CAST(lower_dentry); in ecryptfs_lookup()
417 res = ecryptfs_lookup_interpose(ecryptfs_dentry, lower_dentry); in ecryptfs_lookup()
466 struct dentry *lower_dentry; in ecryptfs_symlink() local
472 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_symlink()
473 dget(lower_dentry); in ecryptfs_symlink()
474 lower_dir_dentry = lock_parent(lower_dentry); in ecryptfs_symlink()
483 rc = vfs_symlink(d_inode(lower_dir_dentry), lower_dentry, in ecryptfs_symlink()
486 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_symlink()
488 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_symlink()
495 dput(lower_dentry); in ecryptfs_symlink()
504 struct dentry *lower_dentry; in ecryptfs_mkdir() local
507 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_mkdir()
508 lower_dir_dentry = lock_parent(lower_dentry); in ecryptfs_mkdir()
509 rc = vfs_mkdir(d_inode(lower_dir_dentry), lower_dentry, mode); in ecryptfs_mkdir()
510 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mkdir()
512 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mkdir()
527 struct dentry *lower_dentry; in ecryptfs_rmdir() local
531 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_rmdir()
533 lower_dir_dentry = lock_parent(lower_dentry); in ecryptfs_rmdir()
534 dget(lower_dentry); in ecryptfs_rmdir()
535 rc = vfs_rmdir(d_inode(lower_dir_dentry), lower_dentry); in ecryptfs_rmdir()
536 dput(lower_dentry); in ecryptfs_rmdir()
552 struct dentry *lower_dentry; in ecryptfs_mknod() local
555 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_mknod()
556 lower_dir_dentry = lock_parent(lower_dentry); in ecryptfs_mknod()
557 rc = vfs_mknod(d_inode(lower_dir_dentry), lower_dentry, mode, dev); in ecryptfs_mknod()
558 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mknod()
560 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mknod()
629 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_readlink_lower() local
634 link = vfs_get_link(lower_dentry, &done); in ecryptfs_readlink_lower()
842 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_truncate() local
844 inode_lock(d_inode(lower_dentry)); in ecryptfs_truncate()
845 rc = notify_change(lower_dentry, &lower_ia, NULL); in ecryptfs_truncate()
846 inode_unlock(d_inode(lower_dentry)); in ecryptfs_truncate()
872 struct dentry *lower_dentry; in ecryptfs_setattr() local
886 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_setattr()
948 inode_lock(d_inode(lower_dentry)); in ecryptfs_setattr()
949 rc = notify_change(lower_dentry, &lower_ia, NULL); in ecryptfs_setattr()
950 inode_unlock(d_inode(lower_dentry)); in ecryptfs_setattr()
1005 struct dentry *lower_dentry; in ecryptfs_setxattr() local
1007 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_setxattr()
1008 if (!(d_inode(lower_dentry)->i_opflags & IOP_XATTR)) { in ecryptfs_setxattr()
1012 rc = vfs_setxattr(lower_dentry, name, value, size, flags); in ecryptfs_setxattr()
1014 fsstack_copy_attr_all(inode, d_inode(lower_dentry)); in ecryptfs_setxattr()
1020 ecryptfs_getxattr_lower(struct dentry *lower_dentry, struct inode *lower_inode, in ecryptfs_getxattr_lower() argument
1030 rc = __vfs_getxattr(lower_dentry, lower_inode, name, value, size); in ecryptfs_getxattr_lower()
1049 struct dentry *lower_dentry; in ecryptfs_listxattr() local
1051 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_listxattr()
1052 if (!d_inode(lower_dentry)->i_op->listxattr) { in ecryptfs_listxattr()
1056 inode_lock(d_inode(lower_dentry)); in ecryptfs_listxattr()
1057 rc = d_inode(lower_dentry)->i_op->listxattr(lower_dentry, list, size); in ecryptfs_listxattr()
1058 inode_unlock(d_inode(lower_dentry)); in ecryptfs_listxattr()
1067 struct dentry *lower_dentry; in ecryptfs_removexattr() local
1070 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_removexattr()
1077 rc = __vfs_removexattr(lower_dentry, name); in ecryptfs_removexattr()