• Home
  • Raw
  • Download

Lines Matching refs:lower_dentry

26 		       struct dentry **lower_dentry,  in lock_parent()  argument
33 *lower_dentry = ecryptfs_dentry_to_lower(dentry); in lock_parent()
36 return (*lower_dentry)->d_parent == lower_dir_dentry ? 0 : -EINVAL; in lock_parent()
123 static int ecryptfs_interpose(struct dentry *lower_dentry, in ecryptfs_interpose() argument
126 struct inode *inode = ecryptfs_get_inode(d_inode(lower_dentry), sb); in ecryptfs_interpose()
138 struct dentry *lower_dentry; in ecryptfs_do_unlink() local
142 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_do_unlink()
143 dget(lower_dentry); // don't even try to make the lower negative in ecryptfs_do_unlink()
145 if (d_unhashed(lower_dentry)) in ecryptfs_do_unlink()
148 rc = vfs_unlink(&init_user_ns, lower_dir, lower_dentry, in ecryptfs_do_unlink()
159 dput(lower_dentry); in ecryptfs_do_unlink()
183 struct dentry *lower_dentry; in ecryptfs_do_create() local
187 rc = lock_parent(ecryptfs_dentry, &lower_dentry, &lower_dir); in ecryptfs_do_create()
190 lower_dentry, mode, true); in ecryptfs_do_create()
197 inode = __ecryptfs_get_inode(d_inode(lower_dentry), in ecryptfs_do_create()
200 vfs_unlink(&init_user_ns, lower_dir, lower_dentry, NULL); in ecryptfs_do_create()
326 struct dentry *lower_dentry) in ecryptfs_lookup_interpose() argument
335 dput(lower_dentry); in ecryptfs_lookup_interpose()
341 BUG_ON(!d_count(lower_dentry)); in ecryptfs_lookup_interpose()
345 dentry_info->lower_path.dentry = lower_dentry; in ecryptfs_lookup_interpose()
353 lower_inode = READ_ONCE(lower_dentry->d_inode); in ecryptfs_lookup_interpose()
394 struct dentry *lower_dir_dentry, *lower_dentry; in ecryptfs_lookup() local
416 lower_dentry = lookup_one_len_unlocked(name, lower_dir_dentry, len); 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()
470 struct dentry *lower_dentry; in ecryptfs_symlink() local
476 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_symlink()
487 rc = vfs_symlink(&init_user_ns, lower_dir, lower_dentry, in ecryptfs_symlink()
490 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_symlink()
492 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_symlink()
508 struct dentry *lower_dentry; in ecryptfs_mkdir() local
511 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_mkdir()
514 lower_dentry, mode); in ecryptfs_mkdir()
515 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mkdir()
517 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mkdir()
532 struct dentry *lower_dentry; in ecryptfs_rmdir() local
536 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_rmdir()
537 dget(lower_dentry); // don't even try to make the lower negative in ecryptfs_rmdir()
539 if (d_unhashed(lower_dentry)) in ecryptfs_rmdir()
542 rc = vfs_rmdir(&init_user_ns, lower_dir, lower_dentry); in ecryptfs_rmdir()
549 dput(lower_dentry); in ecryptfs_rmdir()
561 struct dentry *lower_dentry; in ecryptfs_mknod() local
564 rc = lock_parent(dentry, &lower_dentry, &lower_dir); in ecryptfs_mknod()
567 lower_dentry, mode, dev); in ecryptfs_mknod()
568 if (rc || d_really_is_negative(lower_dentry)) in ecryptfs_mknod()
570 rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb); in ecryptfs_mknod()
649 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_readlink_lower() local
654 link = vfs_get_link(lower_dentry, &done); in ecryptfs_readlink_lower()
862 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_truncate() local
864 inode_lock(d_inode(lower_dentry)); in ecryptfs_truncate()
865 rc = notify_change(&init_user_ns, lower_dentry, in ecryptfs_truncate()
867 inode_unlock(d_inode(lower_dentry)); in ecryptfs_truncate()
897 struct dentry *lower_dentry; in ecryptfs_setattr() local
911 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_setattr()
973 inode_lock(d_inode(lower_dentry)); in ecryptfs_setattr()
974 rc = notify_change(&init_user_ns, lower_dentry, &lower_ia, NULL); in ecryptfs_setattr()
975 inode_unlock(d_inode(lower_dentry)); in ecryptfs_setattr()
1032 struct dentry *lower_dentry; in ecryptfs_setxattr() local
1035 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_setxattr()
1036 lower_inode = d_inode(lower_dentry); in ecryptfs_setxattr()
1042 rc = __vfs_setxattr_locked(&init_user_ns, lower_dentry, name, value, size, flags, NULL); in ecryptfs_setxattr()
1051 ecryptfs_getxattr_lower(struct dentry *lower_dentry, struct inode *lower_inode, in ecryptfs_getxattr_lower() argument
1061 rc = __vfs_getxattr(lower_dentry, lower_inode, name, value, size); in ecryptfs_getxattr_lower()
1080 struct dentry *lower_dentry; in ecryptfs_listxattr() local
1082 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_listxattr()
1083 if (!d_inode(lower_dentry)->i_op->listxattr) { in ecryptfs_listxattr()
1087 inode_lock(d_inode(lower_dentry)); in ecryptfs_listxattr()
1088 rc = d_inode(lower_dentry)->i_op->listxattr(lower_dentry, list, size); in ecryptfs_listxattr()
1089 inode_unlock(d_inode(lower_dentry)); in ecryptfs_listxattr()
1098 struct dentry *lower_dentry; in ecryptfs_removexattr() local
1101 lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_removexattr()
1108 rc = __vfs_removexattr(&init_user_ns, lower_dentry, name); in ecryptfs_removexattr()
1122 struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); in ecryptfs_fileattr_set() local
1125 rc = vfs_fileattr_set(&init_user_ns, lower_dentry, fa); in ecryptfs_fileattr_set()
1126 fsstack_copy_attr_all(d_inode(dentry), d_inode(lower_dentry)); in ecryptfs_fileattr_set()