/linux-6.1.9/scripts/coccinelle/api/ |
D | d_find_alias.cocci | 16 local idexpression struct dentry *dent; 22 if (!(dent@p1 = d_find_alias(...))) S1 24 dent@p1 = d_find_alias(...) 27 <...when != dput(dent) 28 when != if (...) { <+... dput(dent) ...+> } 29 when != true !dent || ... 30 when != dent = E 31 when != E = dent 32 if (!dent || ...) S2 35 return <+...dent...+>; [all …]
|
/linux-6.1.9/fs/gfs2/ |
D | dir.c | 86 typedef int (*gfs2_dscan_t)(const struct gfs2_dirent *dent, 396 static inline int gfs2_dirent_sentinel(const struct gfs2_dirent *dent) in gfs2_dirent_sentinel() argument 398 return dent->de_inum.no_addr == 0 || dent->de_inum.no_formal_ino == 0; in gfs2_dirent_sentinel() 401 static inline int __gfs2_dirent_find(const struct gfs2_dirent *dent, in __gfs2_dirent_find() argument 404 if (!gfs2_dirent_sentinel(dent) && in __gfs2_dirent_find() 405 be32_to_cpu(dent->de_hash) == name->hash && in __gfs2_dirent_find() 406 be16_to_cpu(dent->de_name_len) == name->len && in __gfs2_dirent_find() 407 memcmp(dent+1, name->name, name->len) == 0) in __gfs2_dirent_find() 412 static int gfs2_dirent_find(const struct gfs2_dirent *dent, in gfs2_dirent_find() argument 416 return __gfs2_dirent_find(dent, name, 1); in gfs2_dirent_find() [all …]
|
D | dir.h | 21 struct gfs2_dirent *dent; member 67 static inline void gfs2_qstr2dirent(const struct qstr *name, u16 reclen, struct gfs2_dirent *dent) in gfs2_qstr2dirent() argument 69 dent->de_inum.no_addr = cpu_to_be64(0); in gfs2_qstr2dirent() 70 dent->de_inum.no_formal_ino = cpu_to_be64(0); in gfs2_qstr2dirent() 71 dent->de_hash = cpu_to_be32(name->hash); in gfs2_qstr2dirent() 72 dent->de_rec_len = cpu_to_be16(reclen); in gfs2_qstr2dirent() 73 dent->de_name_len = cpu_to_be16(name->len); in gfs2_qstr2dirent() 74 dent->de_type = cpu_to_be16(0); in gfs2_qstr2dirent() 75 memset(dent->__pad, 0, sizeof(dent->__pad)); in gfs2_qstr2dirent() 76 memcpy(dent + 1, name->name, name->len); in gfs2_qstr2dirent()
|
D | inode.h | 71 struct gfs2_dirent *dent) in gfs2_inum_out() argument 73 dent->de_inum.no_formal_ino = cpu_to_be64(ip->i_no_formal_ino); in gfs2_inum_out() 74 dent->de_inum.no_addr = cpu_to_be64(ip->i_no_addr); in gfs2_inum_out()
|
/linux-6.1.9/security/apparmor/ |
D | apparmorfs.c | 1436 struct dentry *dent, *dir; in __aa_fs_create_rawdata() local 1458 dent = aafs_create_file("abi", S_IFREG | 0444, dir, rawdata, in __aa_fs_create_rawdata() 1460 if (IS_ERR(dent)) in __aa_fs_create_rawdata() 1462 rawdata->dents[AAFS_LOADDATA_ABI] = dent; in __aa_fs_create_rawdata() 1464 dent = aafs_create_file("revision", S_IFREG | 0444, dir, rawdata, in __aa_fs_create_rawdata() 1466 if (IS_ERR(dent)) in __aa_fs_create_rawdata() 1468 rawdata->dents[AAFS_LOADDATA_REVISION] = dent; in __aa_fs_create_rawdata() 1471 dent = aafs_create_file("sha1", S_IFREG | 0444, dir, in __aa_fs_create_rawdata() 1473 if (IS_ERR(dent)) in __aa_fs_create_rawdata() 1475 rawdata->dents[AAFS_LOADDATA_HASH] = dent; in __aa_fs_create_rawdata() [all …]
|
/linux-6.1.9/drivers/virt/coco/efi_secret/ |
D | efi_secret.c | 220 struct dentry *dent; in efi_secret_securityfs_setup() local 246 dent = securityfs_create_dir("secrets", NULL); in efi_secret_securityfs_setup() 247 if (IS_ERR(dent)) { in efi_secret_securityfs_setup() 249 PTR_ERR(dent)); in efi_secret_securityfs_setup() 250 return PTR_ERR(dent); in efi_secret_securityfs_setup() 252 s->secrets_dir = dent; in efi_secret_securityfs_setup() 254 dent = securityfs_create_dir("coco", s->secrets_dir); in efi_secret_securityfs_setup() 255 if (IS_ERR(dent)) { in efi_secret_securityfs_setup() 257 PTR_ERR(dent)); in efi_secret_securityfs_setup() 258 return PTR_ERR(dent); in efi_secret_securityfs_setup() [all …]
|
/linux-6.1.9/tools/perf/util/ |
D | trace-event-info.c | 163 #define for_each_event_tps(dir, dent, tps) \ argument 164 while ((dent = readdir(dir))) \ 165 if (dent->d_type == DT_DIR && \ 166 (strcmp(dent->d_name, ".")) && \ 167 (strcmp(dent->d_name, ".."))) \ 171 struct dirent *dent; in copy_event_system() local 185 for_each_event_tps(dir, dent, tps) { in copy_event_system() 186 if (!name_in_tp_list(dent->d_name, tps)) in copy_event_system() 189 if (asprintf(&format, "%s/%s/format", sys, dent->d_name) < 0) { in copy_event_system() 207 for_each_event_tps(dir, dent, tps) { in copy_event_system() [all …]
|
D | path.c | 84 bool is_directory(const char *base_path, const struct dirent *dent) in is_directory() argument 89 snprintf(path, sizeof(path), "%s/%s", base_path, dent->d_name); in is_directory() 96 bool is_executable_file(const char *base_path, const struct dirent *dent) in is_executable_file() argument 101 snprintf(path, sizeof(path), "%s/%s", base_path, dent->d_name); in is_executable_file()
|
D | path.h | 14 bool is_directory(const char *base_path, const struct dirent *dent); 15 bool is_executable_file(const char *base_path, const struct dirent *dent);
|
D | data.c | 79 struct dirent *dent; in perf_data__open_dir() local 102 while ((dent = readdir(dir)) != NULL) { in perf_data__open_dir() 107 snprintf(path, sizeof(path), "%s/%s", data->path, dent->d_name); in perf_data__open_dir() 111 if (!S_ISREG(st.st_mode) || strncmp(dent->d_name, "data.", 5)) in perf_data__open_dir()
|
/linux-6.1.9/drivers/mtd/ubi/ |
D | debug.c | 252 struct dentry *dent = file->f_path.dentry; in dfs_file_read() local 263 if (dent == d->dfs_chk_gen) in dfs_file_read() 265 else if (dent == d->dfs_chk_io) in dfs_file_read() 267 else if (dent == d->dfs_chk_fastmap) in dfs_file_read() 269 else if (dent == d->dfs_disable_bgt) in dfs_file_read() 271 else if (dent == d->dfs_emulate_bitflips) in dfs_file_read() 273 else if (dent == d->dfs_emulate_io_failures) in dfs_file_read() 275 else if (dent == d->dfs_emulate_power_cut) { in dfs_file_read() 280 } else if (dent == d->dfs_power_cut_min) { in dfs_file_read() 285 } else if (dent == d->dfs_power_cut_max) { in dfs_file_read() [all …]
|
/linux-6.1.9/fs/ubifs/ |
D | dir.c | 184 const struct ubifs_dent_node *dent, in dbg_check_name() argument 189 if (le16_to_cpu(dent->nlen) != fname_len(nm)) in dbg_check_name() 191 if (memcmp(dent->name, fname_name(nm), fname_len(nm))) in dbg_check_name() 202 struct ubifs_dent_node *dent = NULL; in ubifs_lookup() local 220 dent = kmalloc(UBIFS_MAX_DENT_NODE_SZ, GFP_NOFS); in ubifs_lookup() 221 if (!dent) { in ubifs_lookup() 230 err = ubifs_tnc_lookup_dh(c, &key, dent, nm.minor_hash); in ubifs_lookup() 233 err = ubifs_tnc_lookup_nm(c, &key, dent, &nm); in ubifs_lookup() 244 if (dbg_check_name(c, dent, &nm)) { in ubifs_lookup() 249 inode = ubifs_iget(dir->i_sb, le64_to_cpu(dent->inum)); in ubifs_lookup() [all …]
|
D | debug.c | 229 struct ubifs_dent_node *dent, *pdent = NULL; in ubifs_dump_inode() local 273 dent = ubifs_tnc_next_ent(c, &key, &nm); in ubifs_dump_inode() 274 if (IS_ERR(dent)) { in ubifs_dump_inode() 275 if (PTR_ERR(dent) != -ENOENT) in ubifs_dump_inode() 276 pr_err("error %ld\n", PTR_ERR(dent)); in ubifs_dump_inode() 281 count++, (unsigned long long) le64_to_cpu(dent->inum), in ubifs_dump_inode() 282 get_dent_type(dent->type), in ubifs_dump_inode() 283 le16_to_cpu(dent->nlen)); in ubifs_dump_inode() 285 fname_name(&nm) = dent->name; in ubifs_dump_inode() 286 fname_len(&nm) = le16_to_cpu(dent->nlen); in ubifs_dump_inode() [all …]
|
D | journal.c | 66 static inline void zero_dent_node_unused(struct ubifs_dent_node *dent) in zero_dent_node_unused() argument 68 dent->padding1 = 0; in zero_dent_node_unused() 503 static void set_dent_cookie(struct ubifs_info *c, struct ubifs_dent_node *dent) in set_dent_cookie() argument 506 dent->cookie = (__force __le32) get_random_u32(); in set_dent_cookie() 508 dent->cookie = 0; in set_dent_cookie() 547 struct ubifs_dent_node *dent; in ubifs_jnl_update() local 580 dent = kzalloc(len, GFP_NOFS); in ubifs_jnl_update() 581 if (!dent) in ubifs_jnl_update() 590 dent->ch.node_type = UBIFS_DENT_NODE; in ubifs_jnl_update() 596 dent->ch.node_type = UBIFS_XENT_NODE; in ubifs_jnl_update() [all …]
|
D | tnc.c | 310 const struct ubifs_dent_node *dent = node; in lnc_add() local 316 err = ubifs_validate_entry(c, dent); in lnc_add() 319 ubifs_dump_node(c, dent, zbr->len); in lnc_add() 506 struct ubifs_dent_node *dent = node; in fallible_read_node() local 509 key_read(c, &dent->key, &node_key); in fallible_read_node() 533 struct ubifs_dent_node *dent; in matches_name() local 538 dent = kmalloc(zbr->len, GFP_NOFS); in matches_name() 539 if (!dent) in matches_name() 542 err = ubifs_tnc_read_node(c, zbr, dent); in matches_name() 547 err = lnc_add_directly(c, zbr, dent); in matches_name() [all …]
|
D | replay.c | 481 const struct ubifs_dent_node *dent) in ubifs_validate_entry() argument 483 int key_type = key_type_flash(c, dent->key); in ubifs_validate_entry() 484 int nlen = le16_to_cpu(dent->nlen); in ubifs_validate_entry() 486 if (le32_to_cpu(dent->ch.len) != nlen + UBIFS_DENT_NODE_SZ + 1 || in ubifs_validate_entry() 487 dent->type >= UBIFS_ITYPES_CNT || in ubifs_validate_entry() 488 nlen > UBIFS_MAX_NLEN || dent->name[nlen] != 0 || in ubifs_validate_entry() 489 (key_type == UBIFS_XENT_KEY && strnlen(dent->name, nlen) != nlen) || in ubifs_validate_entry() 490 le64_to_cpu(dent->inum) > MAX_INUM) { in ubifs_validate_entry() 765 struct ubifs_dent_node *dent = snod->node; in replay_bud() local 767 err = ubifs_validate_entry(c, dent); in replay_bud() [all …]
|
/linux-6.1.9/tools/perf/arch/x86/util/ |
D | pmu.c | 74 struct dirent *dent; in setup_pmu_alias_list() local 91 while ((dent = readdir(dir))) { in setup_pmu_alias_list() 92 if (!strcmp(dent->d_name, ".") || in setup_pmu_alias_list() 93 !strcmp(dent->d_name, "..")) in setup_pmu_alias_list() 97 TEMPLATE_ALIAS, sysfs, dent->d_name); in setup_pmu_alias_list() 116 pmu_alias = pmu_alias__new(dent->d_name, buf); in setup_pmu_alias_list()
|
/linux-6.1.9/fs/ntfs/ |
D | namei.c | 89 static struct dentry *ntfs_lookup(struct inode *dir_ino, struct dentry *dent, in ntfs_lookup() argument 101 dent, dir_ino->i_ino); in ntfs_lookup() 103 uname_len = ntfs_nlstoucs(vol, dent->d_name.name, dent->d_name.len, in ntfs_lookup() 126 return d_splice_alias(dent_inode, dent); in ntfs_lookup() 154 d_add(dent, NULL); in ntfs_lookup() 242 nls_name.hash = full_name_hash(dent, nls_name.name, nls_name.len); in ntfs_lookup() 244 dent = d_add_ci(dent, dent_inode, &nls_name); in ntfs_lookup() 246 return dent; in ntfs_lookup()
|
/linux-6.1.9/tools/perf/arch/arm/util/ |
D | auxtrace.c | 60 struct dirent *dent; in find_all_hisi_ptt_pmus() local 73 while ((dent = readdir(dir))) { in find_all_hisi_ptt_pmus() 74 if (strstr(dent->d_name, HISI_PTT_PMU_NAME)) in find_all_hisi_ptt_pmus() 89 while ((dent = readdir(dir))) { in find_all_hisi_ptt_pmus() 90 if (strstr(dent->d_name, HISI_PTT_PMU_NAME) && idx < *nr_ptts) { in find_all_hisi_ptt_pmus() 91 hisi_ptt_pmus[idx] = perf_pmu__find(dent->d_name); in find_all_hisi_ptt_pmus()
|
/linux-6.1.9/tools/testing/selftests/ir/ |
D | ir_loopback.c | 73 struct dirent *dent; in lirc_open() local 84 while ((dent = readdir(d)) != NULL) { in lirc_open() 85 if (!strncmp(dent->d_name, "lirc", 4)) { in lirc_open() 86 snprintf(buf, sizeof(buf), "/dev/%s", dent->d_name); in lirc_open() 91 if (!dent) in lirc_open()
|
/linux-6.1.9/security/ |
D | inode.c | 265 struct dentry *dent; in securityfs_create_symlink() local 273 dent = securityfs_create_dentry(name, S_IFLNK | 0444, parent, in securityfs_create_symlink() 275 if (IS_ERR(dent)) in securityfs_create_symlink() 278 return dent; in securityfs_create_symlink()
|
/linux-6.1.9/net/8021q/ |
D | vlanproc.c | 143 vlan->dent = proc_create_single_data(vlandev->name, S_IFREG | 0600, in vlan_proc_add_dev() 145 if (!vlan->dent) in vlan_proc_add_dev() 156 proc_remove(vlan_dev_priv(vlandev)->dent); in vlan_proc_rem_dev() 157 vlan_dev_priv(vlandev)->dent = NULL; in vlan_proc_rem_dev()
|
/linux-6.1.9/tools/perf/ |
D | builtin-buildid-cache.c | 85 struct dirent *dent; in build_id_cache__kcore_existing() local 96 dent = readdir(d); in build_id_cache__kcore_existing() 97 if (!dent) in build_id_cache__kcore_existing() 99 if (dent->d_type != DT_DIR) in build_id_cache__kcore_existing() 102 dent->d_name); in build_id_cache__kcore_existing() 104 to_dir, dent->d_name); in build_id_cache__kcore_existing()
|
/linux-6.1.9/tools/perf/tests/ |
D | dso-data.c | 180 struct dirent *dent; in open_files_cnt() local 190 while ((dent = readdir(dir)) != NULL) { in open_files_cnt() 191 if (!strcmp(dent->d_name, ".") || in open_files_cnt() 192 !strcmp(dent->d_name, "..")) in open_files_cnt()
|
/linux-6.1.9/fs/xfs/scrub/ |
D | dir.c | 208 struct xfs_dir2_data_entry *dent; in xchk_dir_rec() local 263 dent = bp->b_addr + off; in xchk_dir_rec() 285 if (dep == dent) in xchk_dir_rec() 291 ino = be64_to_cpu(dent->inumber); in xchk_dir_rec() 293 tag = be16_to_cpup(xfs_dir2_data_entry_tag_p(mp, dent)); in xchk_dir_rec() 296 if (dent->namelen == 0) { in xchk_dir_rec() 300 calc_hash = xfs_da_hashname(dent->name, dent->namelen); in xchk_dir_rec()
|