Lines Matching refs:dir
1034 const struct dentry *const mnt_root, struct dentry *dir, in collect_domain_accesses() argument
1040 if (WARN_ON_ONCE(!domain || !mnt_root || !dir || !layer_masks_dom)) in collect_domain_accesses()
1042 if (is_nouser_or_private(dir)) in collect_domain_accesses()
1049 dget(dir); in collect_domain_accesses()
1054 if (landlock_unmask_layers(find_rule(domain, dir), access_dom, in collect_domain_accesses()
1066 if (dir == mnt_root || WARN_ON_ONCE(IS_ROOT(dir))) in collect_domain_accesses()
1069 parent_dentry = dget_parent(dir); in collect_domain_accesses()
1070 dput(dir); in collect_domain_accesses()
1071 dir = parent_dentry; in collect_domain_accesses()
1073 dput(dir); in collect_domain_accesses()
1529 static int hook_path_mkdir(const struct path *const dir, in hook_path_mkdir() argument
1532 return current_check_access_path(dir, LANDLOCK_ACCESS_FS_MAKE_DIR); in hook_path_mkdir()
1535 static int hook_path_mknod(const struct path *const dir, in hook_path_mknod() argument
1539 return current_check_access_path(dir, get_mode_access(mode)); in hook_path_mknod()
1542 static int hook_path_symlink(const struct path *const dir, in hook_path_symlink() argument
1546 return current_check_access_path(dir, LANDLOCK_ACCESS_FS_MAKE_SYM); in hook_path_symlink()
1549 static int hook_path_unlink(const struct path *const dir, in hook_path_unlink() argument
1552 return current_check_access_path(dir, LANDLOCK_ACCESS_FS_REMOVE_FILE); in hook_path_unlink()
1555 static int hook_path_rmdir(const struct path *const dir, in hook_path_rmdir() argument
1558 return current_check_access_path(dir, LANDLOCK_ACCESS_FS_REMOVE_DIR); in hook_path_rmdir()