Lines Matching refs:dentry
333 if (!d_is_dir(path->dentry) && in landlock_append_fs_rule()
342 id.key.object = get_inode_object(d_backing_inode(path->dentry)); in landlock_append_fs_rule()
365 const struct dentry *const dentry) in find_rule() argument
374 if (d_is_negative(dentry)) in find_rule()
377 inode = d_backing_inode(dentry); in find_rule()
390 static bool is_nouser_or_private(const struct dentry *dentry) in is_nouser_or_private() argument
392 return (dentry->d_sb->s_flags & SB_NOUSER) || in is_nouser_or_private()
393 (d_is_positive(dentry) && in is_nouser_or_private()
394 unlikely(IS_PRIVATE(d_backing_inode(dentry)))); in is_nouser_or_private()
760 struct dentry *const dentry_child1, in is_access_to_paths_allowed()
764 struct dentry *const dentry_child2) in is_access_to_paths_allowed()
781 if (is_nouser_or_private(path->dentry)) in is_access_to_paths_allowed()
840 struct dentry *parent_dentry; in is_access_to_paths_allowed()
883 rule = find_rule(domain, walker_path.dentry); in is_access_to_paths_allowed()
900 if (walker_path.dentry == walker_path.mnt->mnt_root) { in is_access_to_paths_allowed()
912 if (unlikely(IS_ROOT(walker_path.dentry))) { in is_access_to_paths_allowed()
924 parent_dentry = dget_parent(walker_path.dentry); in is_access_to_paths_allowed()
925 dput(walker_path.dentry); in is_access_to_paths_allowed()
926 walker_path.dentry = parent_dentry; in is_access_to_paths_allowed()
1002 static access_mask_t maybe_remove(const struct dentry *const dentry) in maybe_remove() argument
1004 if (d_is_negative(dentry)) in maybe_remove()
1006 return d_is_dir(dentry) ? LANDLOCK_ACCESS_FS_REMOVE_DIR : in maybe_remove()
1034 const struct dentry *const mnt_root, struct dentry *dir, in collect_domain_accesses()
1051 struct dentry *parent_dentry; in collect_domain_accesses()
1130 static int current_check_refer_path(struct dentry *const old_dentry, in current_check_refer_path()
1132 struct dentry *const new_dentry, in current_check_refer_path()
1140 struct dentry *old_parent; in current_check_refer_path()
1166 if (old_dentry->d_parent == new_dir->dentry) { in current_check_refer_path()
1190 mnt_dir.dentry = new_dir->mnt->mnt_root; in current_check_refer_path()
1198 old_parent = (old_dentry == mnt_dir.dentry) ? old_dentry : in current_check_refer_path()
1202 allow_parent1 = collect_domain_accesses(subject->domain, mnt_dir.dentry, in current_check_refer_path()
1205 allow_parent2 = collect_domain_accesses(subject->domain, mnt_dir.dentry, in current_check_refer_path()
1206 new_dir->dentry, in current_check_refer_path()
1226 request1.audit.u.path.dentry = old_parent; in current_check_refer_path()
1230 request2.audit.u.path.dentry = new_dir->dentry; in current_check_refer_path()
1392 struct dentry *const dentry) in log_fs_change_topology_dentry() argument
1398 .u.dentry = dentry, in log_fs_change_topology_dentry()
1510 static int hook_path_link(struct dentry *const old_dentry, in hook_path_link()
1512 struct dentry *const new_dentry) in hook_path_link()
1519 struct dentry *const old_dentry, in hook_path_rename()
1521 struct dentry *const new_dentry, in hook_path_rename()
1530 struct dentry *const dentry, const umode_t mode) in hook_path_mkdir() argument
1536 struct dentry *const dentry, const umode_t mode, in hook_path_mknod() argument
1543 struct dentry *const dentry, in hook_path_symlink() argument
1550 struct dentry *const dentry) in hook_path_unlink() argument
1556 struct dentry *const dentry) in hook_path_rmdir() argument