Lines Matching refs:lower_dentry

115 static int ecryptfs_interpose(struct dentry *lower_dentry,  in ecryptfs_interpose()  argument
118 struct inode *inode = ecryptfs_get_inode(d_inode(lower_dentry), sb); in ecryptfs_interpose()
130 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_do_unlink() local
138 dget(lower_dentry); // don't even try to make the lower negative in ecryptfs_do_unlink()
139 if (lower_dentry->d_parent != lower_dir_dentry) in ecryptfs_do_unlink()
141 else if (d_unhashed(lower_dentry)) in ecryptfs_do_unlink()
144 rc = vfs_unlink(lower_dir_inode, lower_dentry, NULL); in ecryptfs_do_unlink()
153 dput(lower_dentry); in ecryptfs_do_unlink()
177 struct dentry *lower_dentry; in ecryptfs_do_create() local
181 lower_dentry = ecryptfs_dentry_to_lower(ecryptfs_dentry); in ecryptfs_do_create()
182 lower_dir_dentry = lock_parent(lower_dentry); in ecryptfs_do_create()
183 rc = vfs_create(d_inode(lower_dir_dentry), lower_dentry, mode, true); in ecryptfs_do_create()
190 inode = __ecryptfs_get_inode(d_inode(lower_dentry), in ecryptfs_do_create()
193 vfs_unlink(d_inode(lower_dir_dentry), lower_dentry, NULL); in ecryptfs_do_create()
320 struct dentry *lower_dentry) in ecryptfs_lookup_interpose() argument
329 dput(lower_dentry); in ecryptfs_lookup_interpose()
335 BUG_ON(!d_count(lower_dentry)); in ecryptfs_lookup_interpose()
339 dentry_info->lower_path.dentry = lower_dentry; in ecryptfs_lookup_interpose()
347 lower_inode = READ_ONCE(lower_dentry->d_inode); in ecryptfs_lookup_interpose()
388 struct dentry *lower_dir_dentry, *lower_dentry; in ecryptfs_lookup() local
410 lower_dentry = lookup_one_len_unlocked(name, lower_dir_dentry, len); in ecryptfs_lookup()
411 if (IS_ERR(lower_dentry)) { in ecryptfs_lookup()
414 PTR_ERR(lower_dentry), in ecryptfs_lookup()
416 res = ERR_CAST(lower_dentry); in ecryptfs_lookup()
418 res = ecryptfs_lookup_interpose(ecryptfs_dentry, lower_dentry); in ecryptfs_lookup()
467 struct dentry *lower_dentry; in ecryptfs_symlink() local
473 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_symlink()
474 dget(lower_dentry); in ecryptfs_symlink()
475 lower_dir_dentry = lock_parent(lower_dentry); in ecryptfs_symlink()
484 rc = vfs_symlink(d_inode(lower_dir_dentry), lower_dentry, in ecryptfs_symlink()
487 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_symlink()
489 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_symlink()
496 dput(lower_dentry); in ecryptfs_symlink()
505 struct dentry *lower_dentry; in ecryptfs_mkdir() local
508 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_mkdir()
509 lower_dir_dentry = lock_parent(lower_dentry); in ecryptfs_mkdir()
510 rc = vfs_mkdir(d_inode(lower_dir_dentry), lower_dentry, mode); in ecryptfs_mkdir()
511 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mkdir()
513 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mkdir()
528 struct dentry *lower_dentry; in ecryptfs_rmdir() local
533 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_rmdir()
538 dget(lower_dentry); // don't even try to make the lower negative in ecryptfs_rmdir()
539 if (lower_dentry->d_parent != lower_dir_dentry) in ecryptfs_rmdir()
541 else if (d_unhashed(lower_dentry)) in ecryptfs_rmdir()
544 rc = vfs_rmdir(lower_dir_inode, lower_dentry); in ecryptfs_rmdir()
550 dput(lower_dentry); in ecryptfs_rmdir()
561 struct dentry *lower_dentry; in ecryptfs_mknod() local
564 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_mknod()
565 lower_dir_dentry = lock_parent(lower_dentry); in ecryptfs_mknod()
566 rc = vfs_mknod(d_inode(lower_dir_dentry), lower_dentry, mode, dev); in ecryptfs_mknod()
567 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mknod()
569 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); 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(lower_dentry, &lower_ia, NULL); in ecryptfs_truncate()
859 inode_unlock(d_inode(lower_dentry)); in ecryptfs_truncate()
885 struct dentry *lower_dentry; in ecryptfs_setattr() local
899 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_setattr()
961 inode_lock(d_inode(lower_dentry)); in ecryptfs_setattr()
962 rc = notify_change(lower_dentry, &lower_ia, NULL); in ecryptfs_setattr()
963 inode_unlock(d_inode(lower_dentry)); in ecryptfs_setattr()
1018 struct dentry *lower_dentry; in ecryptfs_setxattr() local
1020 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_setxattr()
1021 if (!(d_inode(lower_dentry)->i_opflags & IOP_XATTR)) { in ecryptfs_setxattr()
1025 rc = vfs_setxattr(lower_dentry, name, value, size, flags); in ecryptfs_setxattr()
1027 fsstack_copy_attr_all(inode, d_inode(lower_dentry)); in ecryptfs_setxattr()
1033 ecryptfs_getxattr_lower(struct dentry *lower_dentry, struct inode *lower_inode, in ecryptfs_getxattr_lower() argument
1043 rc = __vfs_getxattr(lower_dentry, lower_inode, name, value, size); in ecryptfs_getxattr_lower()
1062 struct dentry *lower_dentry; in ecryptfs_listxattr() local
1064 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_listxattr()
1065 if (!d_inode(lower_dentry)->i_op->listxattr) { in ecryptfs_listxattr()
1069 inode_lock(d_inode(lower_dentry)); in ecryptfs_listxattr()
1070 rc = d_inode(lower_dentry)->i_op->listxattr(lower_dentry, list, size); in ecryptfs_listxattr()
1071 inode_unlock(d_inode(lower_dentry)); in ecryptfs_listxattr()
1080 struct dentry *lower_dentry; in ecryptfs_removexattr() local
1083 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_removexattr()
1090 rc = __vfs_removexattr(lower_dentry, name); in ecryptfs_removexattr()