/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-5.10/fs/gfs2/ |
D | dir.c | 86 typedef int (*gfs2_dscan_t)(const struct gfs2_dirent *dent, 397 static inline int gfs2_dirent_sentinel(const struct gfs2_dirent *dent) in gfs2_dirent_sentinel() argument 399 return dent->de_inum.no_addr == 0 || dent->de_inum.no_formal_ino == 0; in gfs2_dirent_sentinel() 402 static inline int __gfs2_dirent_find(const struct gfs2_dirent *dent, in __gfs2_dirent_find() argument 405 if (!gfs2_dirent_sentinel(dent) && in __gfs2_dirent_find() 406 be32_to_cpu(dent->de_hash) == name->hash && in __gfs2_dirent_find() 407 be16_to_cpu(dent->de_name_len) == name->len && in __gfs2_dirent_find() 408 memcmp(dent+1, name->name, name->len) == 0) in __gfs2_dirent_find() 413 static int gfs2_dirent_find(const struct gfs2_dirent *dent, in gfs2_dirent_find() argument 417 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()
|
/kernel/linux/linux-5.10/fs/sharefs/ |
D | sharefs.h | 108 #define SHAREFS_D(dent) ((struct sharefs_dentry_info *)(dent)->d_fsdata) argument 158 static inline void sharefs_get_lower_path(const struct dentry *dent, in sharefs_get_lower_path() argument 161 spin_lock(&SHAREFS_D(dent)->lock); in sharefs_get_lower_path() 162 pathcpy(lower_path, &SHAREFS_D(dent)->lower_path); in sharefs_get_lower_path() 164 spin_unlock(&SHAREFS_D(dent)->lock); in sharefs_get_lower_path() 167 static inline void sharefs_put_lower_path(const struct dentry *dent, in sharefs_put_lower_path() argument 173 static inline void sharefs_set_lower_path(const struct dentry *dent, in sharefs_set_lower_path() argument 176 spin_lock(&SHAREFS_D(dent)->lock); in sharefs_set_lower_path() 177 pathcpy(&SHAREFS_D(dent)->lower_path, lower_path); in sharefs_set_lower_path() 178 spin_unlock(&SHAREFS_D(dent)->lock); in sharefs_set_lower_path() [all …]
|
/kernel/linux/linux-5.10/fs/hmdfs/ |
D | hmdfs_device_view.h | 201 static inline void hmdfs_get_lower_path(struct dentry *dent, struct path *pname) in hmdfs_get_lower_path() argument 203 spin_lock(&hmdfs_d(dent)->lock); in hmdfs_get_lower_path() 204 pname->dentry = hmdfs_d(dent)->lower_path.dentry; in hmdfs_get_lower_path() 205 pname->mnt = hmdfs_d(dent)->lower_path.mnt; in hmdfs_get_lower_path() 207 spin_unlock(&hmdfs_d(dent)->lock); in hmdfs_get_lower_path() 215 static inline void hmdfs_put_reset_lower_path(struct dentry *dent) in hmdfs_put_reset_lower_path() argument 219 spin_lock(&hmdfs_d(dent)->lock); in hmdfs_put_reset_lower_path() 220 if (hmdfs_d(dent)->lower_path.dentry) { in hmdfs_put_reset_lower_path() 221 pname.dentry = hmdfs_d(dent)->lower_path.dentry; in hmdfs_put_reset_lower_path() 222 pname.mnt = hmdfs_d(dent)->lower_path.mnt; in hmdfs_put_reset_lower_path() [all …]
|
/kernel/linux/linux-5.10/security/apparmor/ |
D | apparmorfs.c | 1431 struct dentry *dent, *dir; in __aa_fs_create_rawdata() local 1453 dent = aafs_create_file("abi", S_IFREG | 0444, dir, rawdata, in __aa_fs_create_rawdata() 1455 if (IS_ERR(dent)) in __aa_fs_create_rawdata() 1457 rawdata->dents[AAFS_LOADDATA_ABI] = dent; in __aa_fs_create_rawdata() 1459 dent = aafs_create_file("revision", S_IFREG | 0444, dir, rawdata, in __aa_fs_create_rawdata() 1461 if (IS_ERR(dent)) in __aa_fs_create_rawdata() 1463 rawdata->dents[AAFS_LOADDATA_REVISION] = dent; in __aa_fs_create_rawdata() 1466 dent = aafs_create_file("sha1", S_IFREG | 0444, dir, in __aa_fs_create_rawdata() 1468 if (IS_ERR(dent)) in __aa_fs_create_rawdata() 1470 rawdata->dents[AAFS_LOADDATA_HASH] = dent; in __aa_fs_create_rawdata() [all …]
|
/kernel/linux/linux-5.10/tools/perf/util/ |
D | trace-event-info.c | 155 #define for_each_event(dir, dent, tps) \ argument 156 while ((dent = readdir(dir))) \ 157 if (dent->d_type == DT_DIR && \ 158 (strcmp(dent->d_name, ".")) && \ 159 (strcmp(dent->d_name, ".."))) \ 163 struct dirent *dent; in copy_event_system() local 177 for_each_event(dir, dent, tps) { in copy_event_system() 178 if (!name_in_tp_list(dent->d_name, tps)) in copy_event_system() 181 if (asprintf(&format, "%s/%s/format", sys, dent->d_name) < 0) { in copy_event_system() 199 for_each_event(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 sprintf(path, "%s/%s", base_path, dent->d_name); in is_directory()
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-5.10/fs/ubifs/ |
D | dir.c | 181 const struct ubifs_dent_node *dent, in dbg_check_name() argument 186 if (le16_to_cpu(dent->nlen) != fname_len(nm)) in dbg_check_name() 188 if (memcmp(dent->name, fname_name(nm), fname_len(nm))) in dbg_check_name() 199 struct ubifs_dent_node *dent = NULL; in ubifs_lookup() local 216 dent = kmalloc(UBIFS_MAX_DENT_NODE_SZ, GFP_NOFS); in ubifs_lookup() 217 if (!dent) { in ubifs_lookup() 226 err = ubifs_tnc_lookup_dh(c, &key, dent, nm.minor_hash); in ubifs_lookup() 229 err = ubifs_tnc_lookup_nm(c, &key, dent, &nm); in ubifs_lookup() 240 if (dbg_check_name(c, dent, &nm)) { in ubifs_lookup() 245 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) prandom_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 …]
|
/kernel/linux/linux-5.10/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()
|
/kernel/linux/linux-5.10/tools/testing/selftests/ir/ |
D | ir_loopback.c | 64 struct dirent *dent; in lirc_open() local 75 while ((dent = readdir(d)) != NULL) { in lirc_open() 76 if (!strncmp(dent->d_name, "lirc", 4)) { in lirc_open() 77 snprintf(buf, sizeof(buf), "/dev/%s", dent->d_name); in lirc_open() 82 if (!dent) in lirc_open()
|
/kernel/linux/linux-5.10/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()
|
/kernel/linux/linux-5.10/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()
|
/kernel/linux/linux-5.10/tools/perf/ |
D | builtin-buildid-cache.c | 84 struct dirent *dent; in build_id_cache__kcore_existing() local 95 dent = readdir(d); in build_id_cache__kcore_existing() 96 if (!dent) in build_id_cache__kcore_existing() 98 if (dent->d_type != DT_DIR) in build_id_cache__kcore_existing() 101 dent->d_name); in build_id_cache__kcore_existing() 103 to_dir, dent->d_name); in build_id_cache__kcore_existing()
|
/kernel/linux/linux-5.10/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()
|
/kernel/liteos_a/fs/vfs/ |
D | path_cache.c | 87 struct PathCache *dent = NULL; in PathCacheMemoryDump() local 89 LOS_DL_LIST_FOR_EACH_ENTRY(dent, dhead, struct PathCache, hashEntry) { in PathCacheMemoryDump() 91 nameSum += dent->nameLen; in PathCacheMemoryDump()
|
/kernel/liteos_m/components/fs/littlefs/ |
D | lfs_adapter.c | 357 int LfsReaddir(struct Dir *dir, struct dirent *dent) in LfsReaddir() argument 363 (dent == NULL)) { in LfsReaddir() 378 (void)strncpy_s(dent->d_name, sizeof(dent->d_name), lfsInfo.name, strlen(lfsInfo.name) + 1); in LfsReaddir() 380 dent->d_type = DT_DIR; in LfsReaddir() 382 dent->d_type = DT_REG; in LfsReaddir() 385 dent->d_reclen = lfsInfo.size; in LfsReaddir()
|
/kernel/uniproton/src/fs/littlefs/ |
D | lfs_adapter.c | 329 static S32 OsLfsReaddir(struct TagDir *dir, struct dirent *dent) in OsLfsReaddir() argument 335 (dent == NULL)) { in OsLfsReaddir() 351 (void)strncpy_s(dent->d_name, sizeof(dent->d_name), lfsInfo.name, strlen(lfsInfo.name) + 1); in OsLfsReaddir() 353 dent->d_type = DT_DIR; in OsLfsReaddir() 355 dent->d_type = DT_REG; in OsLfsReaddir() 358 dent->d_reclen = lfsInfo.size; in OsLfsReaddir()
|
/kernel/linux/linux-5.10/arch/arm/mach-omap1/ |
D | clock.c | 995 d = debugfs_create_dir(c->name, pa ? pa->dent : clk_debugfs_root); in clk_debugfs_register_one() 996 c->dent = d; in clk_debugfs_register_one() 998 debugfs_create_u8("usecount", S_IRUGO, c->dent, &c->usecount); in clk_debugfs_register_one() 999 debugfs_create_ulong("rate", S_IRUGO, c->dent, &c->rate); in clk_debugfs_register_one() 1000 debugfs_create_x8("flags", S_IRUGO, c->dent, &c->flags); in clk_debugfs_register_one() 1007 if (pa && !pa->dent) in clk_debugfs_register() 1010 if (!c->dent) in clk_debugfs_register()
|