• Home
  • Raw
  • Download

Lines Matching refs:de

218 					struct ext2_dir_entry_2 * de)  in ext2_match()  argument
220 if (len != de->name_len) in ext2_match()
222 if (!de->inode) in ext2_match()
224 return !memcmp(name, de->name, len); in ext2_match()
239 ext2_dirent *de = (ext2_dirent*)(base + offset); in ext2_validate_entry() local
241 while ((char*)p < (char*)de) { in ext2_validate_entry()
271 static inline void ext2_set_de_type(ext2_dirent *de, struct inode *inode) in ext2_set_de_type() argument
275 de->file_type = ext2_type_by_mode[(mode & S_IFMT)>>S_SHIFT]; in ext2_set_de_type()
277 de->file_type = 0; in ext2_set_de_type()
301 ext2_dirent *de; in ext2_readdir() local
320 de = (ext2_dirent *)(kaddr+offset); in ext2_readdir()
322 for ( ;(char*)de <= limit; de = ext2_next_entry(de)) { in ext2_readdir()
323 if (de->rec_len == 0) { in ext2_readdir()
329 if (de->inode) { in ext2_readdir()
333 if (types && de->file_type < EXT2_FT_MAX) in ext2_readdir()
334 d_type = types[de->file_type]; in ext2_readdir()
336 offset = (char *)de - kaddr; in ext2_readdir()
337 over = filldir(dirent, de->name, de->name_len, in ext2_readdir()
339 le32_to_cpu(de->inode), d_type); in ext2_readdir()
345 filp->f_pos += ext2_rec_len_from_disk(de->rec_len); in ext2_readdir()
370 ext2_dirent * de; in ext2_find_entry() local
388 de = (ext2_dirent *) kaddr; in ext2_find_entry()
390 while ((char *) de <= kaddr) { in ext2_find_entry()
391 if (de->rec_len == 0) { in ext2_find_entry()
397 if (ext2_match (namelen, name, de)) in ext2_find_entry()
399 de = ext2_next_entry(de); in ext2_find_entry()
422 return de; in ext2_find_entry()
428 ext2_dirent *de = NULL; in ext2_dotdot() local
431 de = ext2_next_entry((ext2_dirent *) page_address(page)); in ext2_dotdot()
434 return de; in ext2_dotdot()
440 struct ext2_dir_entry_2 *de; in ext2_inode_by_name() local
443 de = ext2_find_entry (dir, child, &page); in ext2_inode_by_name()
444 if (de) { in ext2_inode_by_name()
445 res = le32_to_cpu(de->inode); in ext2_inode_by_name()
452 void ext2_set_link(struct inode *dir, struct ext2_dir_entry_2 *de, in ext2_set_link() argument
456 (char *) de - (char *) page_address(page); in ext2_set_link()
457 unsigned len = ext2_rec_len_from_disk(de->rec_len); in ext2_set_link()
464 de->inode = cpu_to_le32(inode->i_ino); in ext2_set_link()
465 ext2_set_de_type(de, inode); in ext2_set_link()
485 ext2_dirent * de; in ext2_add_link() local
507 de = (ext2_dirent *)kaddr; in ext2_add_link()
509 while ((char *)de <= kaddr) { in ext2_add_link()
510 if ((char *)de == dir_end) { in ext2_add_link()
514 de->rec_len = ext2_rec_len_to_disk(chunk_size); in ext2_add_link()
515 de->inode = 0; in ext2_add_link()
518 if (de->rec_len == 0) { in ext2_add_link()
525 if (ext2_match (namelen, name, de)) in ext2_add_link()
527 name_len = EXT2_DIR_REC_LEN(de->name_len); in ext2_add_link()
528 rec_len = ext2_rec_len_from_disk(de->rec_len); in ext2_add_link()
529 if (!de->inode && rec_len >= reclen) in ext2_add_link()
533 de = (ext2_dirent *) ((char *) de + rec_len); in ext2_add_link()
543 (char*)de - (char*)page_address(page); in ext2_add_link()
548 if (de->inode) { in ext2_add_link()
549 ext2_dirent *de1 = (ext2_dirent *) ((char *) de + name_len); in ext2_add_link()
551 de->rec_len = ext2_rec_len_to_disk(name_len); in ext2_add_link()
552 de = de1; in ext2_add_link()
554 de->name_len = namelen; in ext2_add_link()
555 memcpy(de->name, name, namelen); in ext2_add_link()
556 de->inode = cpu_to_le32(inode->i_ino); in ext2_add_link()
557 ext2_set_de_type (de, inode); in ext2_add_link()
586 ext2_dirent * de = (ext2_dirent *) (kaddr + from); in ext2_delete_entry() local
589 while ((char*)de < (char*)dir) { in ext2_delete_entry()
590 if (de->rec_len == 0) { in ext2_delete_entry()
596 pde = de; in ext2_delete_entry()
597 de = ext2_next_entry(de); in ext2_delete_entry()
626 struct ext2_dir_entry_2 * de; in ext2_make_empty() local
641 de = (struct ext2_dir_entry_2 *)kaddr; in ext2_make_empty()
642 de->name_len = 1; in ext2_make_empty()
643 de->rec_len = ext2_rec_len_to_disk(EXT2_DIR_REC_LEN(1)); in ext2_make_empty()
644 memcpy (de->name, ".\0\0", 4); in ext2_make_empty()
645 de->inode = cpu_to_le32(inode->i_ino); in ext2_make_empty()
646 ext2_set_de_type (de, inode); in ext2_make_empty()
648 de = (struct ext2_dir_entry_2 *)(kaddr + EXT2_DIR_REC_LEN(1)); in ext2_make_empty()
649 de->name_len = 2; in ext2_make_empty()
650 de->rec_len = ext2_rec_len_to_disk(chunk_size - EXT2_DIR_REC_LEN(1)); in ext2_make_empty()
651 de->inode = cpu_to_le32(parent->i_ino); in ext2_make_empty()
652 memcpy (de->name, "..\0", 4); in ext2_make_empty()
653 ext2_set_de_type (de, inode); in ext2_make_empty()
672 ext2_dirent * de; in ext2_empty_dir() local
681 de = (ext2_dirent *)kaddr; in ext2_empty_dir()
684 while ((char *)de <= kaddr) { in ext2_empty_dir()
685 if (de->rec_len == 0) { in ext2_empty_dir()
688 printk("kaddr=%p, de=%p\n", kaddr, de); in ext2_empty_dir()
691 if (de->inode != 0) { in ext2_empty_dir()
693 if (de->name[0] != '.') in ext2_empty_dir()
695 if (de->name_len > 2) in ext2_empty_dir()
697 if (de->name_len < 2) { in ext2_empty_dir()
698 if (de->inode != in ext2_empty_dir()
701 } else if (de->name[1] != '.') in ext2_empty_dir()
704 de = ext2_next_entry(de); in ext2_empty_dir()