/fs/gfs2/ |
D | dir.c | 85 typedef int (*gfs2_dscan_t)(const struct gfs2_dirent *dent, 342 static inline int gfs2_dirent_sentinel(const struct gfs2_dirent *dent) in gfs2_dirent_sentinel() argument 344 return dent->de_inum.no_addr == 0 || dent->de_inum.no_formal_ino == 0; in gfs2_dirent_sentinel() 347 static inline int __gfs2_dirent_find(const struct gfs2_dirent *dent, in __gfs2_dirent_find() argument 350 if (!gfs2_dirent_sentinel(dent) && in __gfs2_dirent_find() 351 be32_to_cpu(dent->de_hash) == name->hash && in __gfs2_dirent_find() 352 be16_to_cpu(dent->de_name_len) == name->len && in __gfs2_dirent_find() 353 memcmp(dent+1, name->name, name->len) == 0) in __gfs2_dirent_find() 358 static int gfs2_dirent_find(const struct gfs2_dirent *dent, in gfs2_dirent_find() argument 362 return __gfs2_dirent_find(dent, name, 1); in gfs2_dirent_find() [all …]
|
D | dir.h | 52 static inline void gfs2_qstr2dirent(const struct qstr *name, u16 reclen, struct gfs2_dirent *dent) in gfs2_qstr2dirent() argument 54 dent->de_inum.no_addr = cpu_to_be64(0); in gfs2_qstr2dirent() 55 dent->de_inum.no_formal_ino = cpu_to_be64(0); in gfs2_qstr2dirent() 56 dent->de_hash = cpu_to_be32(name->hash); in gfs2_qstr2dirent() 57 dent->de_rec_len = cpu_to_be16(reclen); in gfs2_qstr2dirent() 58 dent->de_name_len = cpu_to_be16(name->len); in gfs2_qstr2dirent() 59 dent->de_type = cpu_to_be16(0); in gfs2_qstr2dirent() 60 memset(dent->__pad, 0, sizeof(dent->__pad)); in gfs2_qstr2dirent() 61 memcpy(dent + 1, name->name, name->len); in gfs2_qstr2dirent()
|
D | inode.h | 69 struct gfs2_dirent *dent) in gfs2_inum_out() argument 71 dent->de_inum.no_formal_ino = cpu_to_be64(ip->i_no_formal_ino); in gfs2_inum_out() 72 dent->de_inum.no_addr = cpu_to_be64(ip->i_no_addr); in gfs2_inum_out()
|
D | ops_inode.c | 436 struct gfs2_dirent *dent = (struct gfs2_dirent *)(di+1); in gfs2_mkdir() local 441 gfs2_qstr2dirent(&str, GFS2_DIRENT_SIZE(str.len), dent); in gfs2_mkdir() 442 dent->de_inum = di->di_num; /* already GFS2 endian */ in gfs2_mkdir() 443 dent->de_type = cpu_to_be16(DT_DIR); in gfs2_mkdir() 447 dent = (struct gfs2_dirent *)((char*)dent + GFS2_DIRENT_SIZE(1)); in gfs2_mkdir() 448 gfs2_qstr2dirent(&str, dibh->b_size - GFS2_DIRENT_SIZE(1) - sizeof(struct gfs2_dinode), dent); in gfs2_mkdir() 450 gfs2_inum_out(dip, dent); in gfs2_mkdir() 451 dent->de_type = cpu_to_be16(DT_DIR); in gfs2_mkdir()
|
/fs/9p/ |
D | fid.c | 45 struct v9fs_dentry *dent; in v9fs_fid_add() local 50 dent = dentry->d_fsdata; in v9fs_fid_add() 51 if (!dent) { in v9fs_fid_add() 52 dent = kmalloc(sizeof(struct v9fs_dentry), GFP_KERNEL); in v9fs_fid_add() 53 if (!dent) in v9fs_fid_add() 56 spin_lock_init(&dent->lock); in v9fs_fid_add() 57 INIT_LIST_HEAD(&dent->fidlist); in v9fs_fid_add() 58 dentry->d_fsdata = dent; in v9fs_fid_add() 61 spin_lock(&dent->lock); in v9fs_fid_add() 62 list_add(&fid->dlist, &dent->fidlist); in v9fs_fid_add() [all …]
|
D | vfs_dentry.c | 90 struct v9fs_dentry *dent; in v9fs_dentry_release() local 95 dent = dentry->d_fsdata; in v9fs_dentry_release() 96 if (dent) { in v9fs_dentry_release() 97 list_for_each_entry_safe(current_fid, temp, &dent->fidlist, in v9fs_dentry_release() 102 kfree(dent); in v9fs_dentry_release()
|
/fs/smbfs/ |
D | cache.c | 83 struct dentry *dent = dentry; in smb_dget_fpos() local 86 if (d_validate(dent, parent)) { in smb_dget_fpos() 87 if (dent->d_name.len <= SMB_MAXNAMELEN && in smb_dget_fpos() 88 (unsigned long)dent->d_fsdata == fpos) { in smb_dget_fpos() 89 if (!dent->d_inode) { in smb_dget_fpos() 90 dput(dent); in smb_dget_fpos() 91 dent = NULL; in smb_dget_fpos() 93 return dent; in smb_dget_fpos() 95 dput(dent); in smb_dget_fpos() 102 dent = list_entry(next, struct dentry, d_u.d_child); in smb_dget_fpos() [all …]
|
D | dir.c | 165 struct dentry *dent; in smb_readdir() local 168 dent = smb_dget_fpos(ctl.cache->dentry[ctl.idx], in smb_readdir() 170 if (!dent) in smb_readdir() 173 res = filldir(dirent, dent->d_name.name, in smb_readdir() 174 dent->d_name.len, filp->f_pos, in smb_readdir() 175 dent->d_inode->i_ino, DT_UNKNOWN); in smb_readdir() 176 dput(dent); in smb_readdir()
|
/fs/ubifs/ |
D | dir.c | 182 static int dbg_check_name(struct ubifs_dent_node *dent, struct qstr *nm) in dbg_check_name() argument 186 if (le16_to_cpu(dent->nlen) != nm->len) in dbg_check_name() 188 if (memcmp(dent->name, nm->name, nm->len)) in dbg_check_name() 195 #define dbg_check_name(dent, nm) 0 argument 205 struct ubifs_dent_node *dent; in ubifs_lookup() local 214 dent = kmalloc(UBIFS_MAX_DENT_NODE_SZ, GFP_NOFS); in ubifs_lookup() 215 if (!dent) in ubifs_lookup() 220 err = ubifs_tnc_lookup_nm(c, &key, dent, &dentry->d_name); in ubifs_lookup() 229 if (dbg_check_name(dent, &dentry->d_name)) { in ubifs_lookup() 234 inode = ubifs_iget(dir->i_sb, le64_to_cpu(dent->inum)); in ubifs_lookup() [all …]
|
D | journal.c | 78 static inline void zero_dent_node_unused(struct ubifs_dent_node *dent) in zero_dent_node_unused() argument 80 dent->padding1 = 0; in zero_dent_node_unused() 81 memset(dent->padding2, 0, 4); in zero_dent_node_unused() 544 struct ubifs_dent_node *dent; in ubifs_jnl_update() local 570 dent = kmalloc(len, GFP_NOFS); in ubifs_jnl_update() 571 if (!dent) in ubifs_jnl_update() 580 dent->ch.node_type = UBIFS_DENT_NODE; in ubifs_jnl_update() 583 dent->ch.node_type = UBIFS_XENT_NODE; in ubifs_jnl_update() 587 key_write(c, &dent_key, dent->key); in ubifs_jnl_update() 588 dent->inum = deletion ? 0 : cpu_to_le64(inode->i_ino); in ubifs_jnl_update() [all …]
|
D | debug.c | 466 const struct ubifs_dent_node *dent = node; in dbg_dump_node() local 467 int nlen = le16_to_cpu(dent->nlen); in dbg_dump_node() 469 key_read(c, &dent->key, &key); in dbg_dump_node() 472 (unsigned long long)le64_to_cpu(dent->inum)); in dbg_dump_node() 473 printk(KERN_DEBUG "\ttype %d\n", (int)dent->type); in dbg_dump_node() 481 for (i = 0; i < nlen && dent->name[i]; i++) in dbg_dump_node() 482 printk("%c", dent->name[i]); in dbg_dump_node() 972 struct ubifs_dent_node *dent, *pdent = NULL; in dbg_check_dir_size() local 986 dent = ubifs_tnc_next_ent(c, &key, &nm); in dbg_check_dir_size() 987 if (IS_ERR(dent)) { in dbg_check_dir_size() [all …]
|
D | replay.c | 461 const struct ubifs_dent_node *dent) in ubifs_validate_entry() argument 463 int key_type = key_type_flash(c, dent->key); in ubifs_validate_entry() 464 int nlen = le16_to_cpu(dent->nlen); in ubifs_validate_entry() 466 if (le32_to_cpu(dent->ch.len) != nlen + UBIFS_DENT_NODE_SZ + 1 || in ubifs_validate_entry() 467 dent->type >= UBIFS_ITYPES_CNT || in ubifs_validate_entry() 468 nlen > UBIFS_MAX_NLEN || dent->name[nlen] != 0 || in ubifs_validate_entry() 469 strnlen(dent->name, nlen) != nlen || in ubifs_validate_entry() 470 le64_to_cpu(dent->inum) > MAX_INUM) { in ubifs_validate_entry() 576 struct ubifs_dent_node *dent = snod->node; in replay_bud() local 578 err = ubifs_validate_entry(c, dent); in replay_bud() [all …]
|
D | tnc.c | 333 const struct ubifs_dent_node *dent = node; in lnc_add() local 339 err = ubifs_validate_entry(c, dent); in lnc_add() 342 dbg_dump_node(c, dent); in lnc_add() 510 struct ubifs_dent_node *dent = node; in fallible_read_node() local 513 key_read(c, &dent->key, &node_key); in fallible_read_node() 537 struct ubifs_dent_node *dent; in matches_name() local 542 dent = kmalloc(zbr->len, GFP_NOFS); in matches_name() 543 if (!dent) in matches_name() 546 err = ubifs_tnc_read_node(c, zbr, dent); in matches_name() 551 err = lnc_add_directly(c, zbr, dent); in matches_name() [all …]
|
D | ubifs.h | 1588 const struct ubifs_dent_node *dent);
|
/fs/ntfs/ |
D | namei.c | 102 static struct dentry *ntfs_lookup(struct inode *dir_ino, struct dentry *dent, in ntfs_lookup() argument 114 dent->d_name.name, dir_ino->i_ino); in ntfs_lookup() 116 uname_len = ntfs_nlstoucs(vol, dent->d_name.name, dent->d_name.len, in ntfs_lookup() 139 return d_splice_alias(dent_inode, dent); in ntfs_lookup() 167 d_add(dent, NULL); in ntfs_lookup() 257 dent = d_add_ci(dent, dent_inode, &nls_name); in ntfs_lookup() 259 return dent; in ntfs_lookup()
|
/fs/ncpfs/ |
D | dir.c | 351 struct dentry *dent = dentry; in ncp_dget_fpos() local 354 if (d_validate(dent, parent)) { in ncp_dget_fpos() 355 if (dent->d_name.len <= NCP_MAXPATHLEN && in ncp_dget_fpos() 356 (unsigned long)dent->d_fsdata == fpos) { in ncp_dget_fpos() 357 if (!dent->d_inode) { in ncp_dget_fpos() 358 dput(dent); in ncp_dget_fpos() 359 dent = NULL; in ncp_dget_fpos() 361 return dent; in ncp_dget_fpos() 363 dput(dent); in ncp_dget_fpos() 370 dent = list_entry(next, struct dentry, d_u.d_child); in ncp_dget_fpos() [all …]
|