tag | line | file | source code |
de | 54 | arch/alpha/kernel/osf_sys.c | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de))) |
de | 54 | fs/dcache.c | #define COPYDATA(de, newde) \ |
de | 55 | fs/dcache.c | memcpy((void *) &newde->dc_dev, (void *) &de->dc_dev, \ |
de | 77 | fs/dcache.c | static inline void remove_lru(struct dir_cache_entry * de) |
de | 79 | fs/dcache.c | de->next_lru->prev_lru = de->prev_lru; |
de | 80 | fs/dcache.c | de->prev_lru->next_lru = de->next_lru; |
de | 83 | fs/dcache.c | static inline void add_lru(struct dir_cache_entry * de, struct dir_cache_entry *head) |
de | 85 | fs/dcache.c | de->next_lru = head; |
de | 86 | fs/dcache.c | de->prev_lru = head->prev_lru; |
de | 87 | fs/dcache.c | de->prev_lru->next_lru = de; |
de | 88 | fs/dcache.c | head->prev_lru = de; |
de | 91 | fs/dcache.c | static inline void update_lru(struct dir_cache_entry * de) |
de | 93 | fs/dcache.c | if (de == *de->lru_head) |
de | 94 | fs/dcache.c | *de->lru_head = de->next_lru; |
de | 96 | fs/dcache.c | remove_lru(de); |
de | 97 | fs/dcache.c | add_lru(de,*de->lru_head); |
de | 113 | fs/dcache.c | static inline void remove_hash(struct dir_cache_entry * de) |
de | 115 | fs/dcache.c | if (de->h.next) { |
de | 116 | fs/dcache.c | de->h.next->h.prev = de->h.prev; |
de | 117 | fs/dcache.c | de->h.prev->h.next = de->h.next; |
de | 118 | fs/dcache.c | de->h.next = NULL; |
de | 122 | fs/dcache.c | static inline void add_hash(struct dir_cache_entry * de, struct hash_list * hash) |
de | 124 | fs/dcache.c | de->h.next = hash->next; |
de | 125 | fs/dcache.c | de->h.prev = (struct dir_cache_entry *) hash; |
de | 126 | fs/dcache.c | hash->next->h.prev = de; |
de | 127 | fs/dcache.c | hash->next = de; |
de | 135 | fs/dcache.c | struct dir_cache_entry * de = hash->next; |
de | 137 | fs/dcache.c | for (de = hash->next ; de != (struct dir_cache_entry *) hash ; de = de->h.next) { |
de | 138 | fs/dcache.c | if (de->dc_dev != dir->i_dev) |
de | 140 | fs/dcache.c | if (de->dir != dir->i_ino) |
de | 142 | fs/dcache.c | if (de->version != dir->i_version) |
de | 144 | fs/dcache.c | if (de->name_len != len) |
de | 146 | fs/dcache.c | if (memcmp(de->name, name, len)) |
de | 148 | fs/dcache.c | return de; |
de | 159 | fs/dcache.c | struct dir_cache_entry * de; |
de | 165 | fs/dcache.c | de = level2_head; |
de | 166 | fs/dcache.c | level2_head = de->next_lru; |
de | 167 | fs/dcache.c | remove_hash(de); |
de | 168 | fs/dcache.c | COPYDATA(old_de, de); |
de | 169 | fs/dcache.c | add_hash(de, hash); |
de | 175 | fs/dcache.c | struct dir_cache_entry *de; |
de | 180 | fs/dcache.c | de = find_entry(dir, name, len, hash); |
de | 181 | fs/dcache.c | if (!de) |
de | 183 | fs/dcache.c | *ino = de->ino; |
de | 184 | fs/dcache.c | move_to_level2(de, hash); |
de | 191 | fs/dcache.c | struct dir_cache_entry *de; |
de | 196 | fs/dcache.c | if ((de = find_entry(dir, name, len, hash)) != NULL) { |
de | 197 | fs/dcache.c | de->ino = ino; |
de | 198 | fs/dcache.c | update_lru(de); |
de | 201 | fs/dcache.c | de = level1_head; |
de | 202 | fs/dcache.c | level1_head = de->next_lru; |
de | 203 | fs/dcache.c | remove_hash(de); |
de | 204 | fs/dcache.c | de->dc_dev = dir->i_dev; |
de | 205 | fs/dcache.c | de->dir = dir->i_ino; |
de | 206 | fs/dcache.c | de->version = dir->i_version; |
de | 207 | fs/dcache.c | de->ino = ino; |
de | 208 | fs/dcache.c | de->name_len = len; |
de | 209 | fs/dcache.c | memcpy(de->name, name, len); |
de | 210 | fs/dcache.c | add_hash(de, hash); |
de | 71 | fs/ext/dir.c | struct ext_dir_entry * de; |
de | 86 | fs/ext/dir.c | de = (struct ext_dir_entry *) (bh->b_data + i); |
de | 87 | fs/ext/dir.c | if (!de->rec_len) |
de | 89 | fs/ext/dir.c | i += de->rec_len; |
de | 92 | fs/ext/dir.c | de = (struct ext_dir_entry *) (offset + bh->b_data); |
de | 94 | fs/ext/dir.c | if (de->rec_len < 8 || de->rec_len % 8 != 0 || |
de | 95 | fs/ext/dir.c | de->rec_len < de->name_len + 8 || |
de | 96 | fs/ext/dir.c | (de->rec_len + (off_t) filp->f_pos - 1) / 1024 > ((off_t) filp->f_pos / 1024)) { |
de | 101 | fs/ext/dir.c | offset, de->rec_len, de->name_len); |
de | 107 | fs/ext/dir.c | if (de->inode) { |
de | 108 | fs/ext/dir.c | error = filldir(dirent, de->name, de->name_len, filp->f_pos, de->inode); |
de | 112 | fs/ext/dir.c | offset += de->rec_len; |
de | 113 | fs/ext/dir.c | filp->f_pos += de->rec_len; |
de | 114 | fs/ext/dir.c | ((char *) de) += de->rec_len; |
de | 56 | fs/ext/namei.c | static int ext_match(int len,const char * name,struct ext_dir_entry * de) |
de | 58 | fs/ext/namei.c | if (!de || !de->inode || len > EXT_NAME_LEN) |
de | 61 | fs/ext/namei.c | if (!len && (de->name[0]=='.') && (de->name[1]=='\0')) |
de | 63 | fs/ext/namei.c | if (len != de->name_len) |
de | 65 | fs/ext/namei.c | return !memcmp(name, de->name, len); |
de | 85 | fs/ext/namei.c | struct ext_dir_entry * de; |
de | 105 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
de | 107 | fs/ext/namei.c | if ((char *)de >= BLOCK_SIZE+bh->b_data) { |
de | 113 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
de | 117 | fs/ext/namei.c | if (de->rec_len < 8 || de->rec_len % 8 != 0 || |
de | 118 | fs/ext/namei.c | de->rec_len < de->name_len + 8 || |
de | 119 | fs/ext/namei.c | (((char *) de) + de->rec_len-1 >= BLOCK_SIZE+bh->b_data)) { |
de | 124 | fs/ext/namei.c | de->rec_len, de->name_len); |
de | 125 | fs/ext/namei.c | de = (struct ext_dir_entry *) (bh->b_data+BLOCK_SIZE); |
de | 131 | fs/ext/namei.c | if (ext_match(namelen,name,de)) { |
de | 132 | fs/ext/namei.c | *res_dir = de; |
de | 134 | fs/ext/namei.c | if (offset + de->rec_len < dir->i_size && |
de | 135 | fs/ext/namei.c | ((char *)de) + de->rec_len < BLOCK_SIZE+bh->b_data) |
de | 137 | fs/ext/namei.c | ((char *) de + de->rec_len); |
de | 142 | fs/ext/namei.c | offset += de->rec_len; |
de | 144 | fs/ext/namei.c | *prev_dir = de; |
de | 145 | fs/ext/namei.c | de = (struct ext_dir_entry *) ((char *) de + de->rec_len); |
de | 155 | fs/ext/namei.c | struct ext_dir_entry * de; |
de | 165 | fs/ext/namei.c | if (!(bh = ext_find_entry(dir,name,len,&de,NULL,NULL))) { |
de | 169 | fs/ext/namei.c | ino = de->inode; |
de | 196 | fs/ext/namei.c | struct ext_dir_entry * de, * de1; |
de | 215 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
de | 217 | fs/ext/namei.c | if ((char *)de >= BLOCK_SIZE+bh->b_data && offset < dir->i_size) { |
de | 226 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
de | 236 | fs/ext/namei.c | de->inode = 0; |
de | 237 | fs/ext/namei.c | de->rec_len = BLOCK_SIZE |
de | 239 | fs/ext/namei.c | de->name_len = 0; |
de | 240 | fs/ext/namei.c | offset += de->rec_len; |
de | 241 | fs/ext/namei.c | dir->i_size += de->rec_len; |
de | 256 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
de | 259 | fs/ext/namei.c | de->inode=0; |
de | 260 | fs/ext/namei.c | de->rec_len = rec_len; |
de | 261 | fs/ext/namei.c | dir->i_size += de->rec_len; |
de | 267 | fs/ext/namei.c | if (de->rec_len < 8 || de->rec_len % 4 != 0 || |
de | 268 | fs/ext/namei.c | de->rec_len < de->name_len + 8 || |
de | 269 | fs/ext/namei.c | (((char *) de) + de->rec_len-1 >= BLOCK_SIZE+bh->b_data)) { |
de | 274 | fs/ext/namei.c | de->rec_len, de->name_len); |
de | 278 | fs/ext/namei.c | if (!de->inode && de->rec_len >= rec_len) { |
de | 279 | fs/ext/namei.c | if (de->rec_len > rec_len |
de | 280 | fs/ext/namei.c | && de->rec_len - rec_len >= EXT_DIR_MIN_SIZE) { |
de | 285 | fs/ext/namei.c | de1 = (struct ext_dir_entry *) ((char *) de + rec_len); |
de | 287 | fs/ext/namei.c | de1->rec_len = de->rec_len - rec_len; |
de | 289 | fs/ext/namei.c | de->rec_len = rec_len; |
de | 293 | fs/ext/namei.c | de->name_len = namelen; |
de | 295 | fs/ext/namei.c | de->name[i] = name[i]; |
de | 297 | fs/ext/namei.c | *res_dir = de; |
de | 300 | fs/ext/namei.c | offset += de->rec_len; |
de | 301 | fs/ext/namei.c | de = (struct ext_dir_entry *) ((char *) de + de->rec_len); |
de | 312 | fs/ext/namei.c | struct ext_dir_entry * de; |
de | 325 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
de | 333 | fs/ext/namei.c | de->inode = inode->i_ino; |
de | 345 | fs/ext/namei.c | struct ext_dir_entry * de; |
de | 349 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
de | 384 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
de | 392 | fs/ext/namei.c | de->inode = inode->i_ino; |
de | 404 | fs/ext/namei.c | struct ext_dir_entry * de; |
de | 406 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
de | 434 | fs/ext/namei.c | de = (struct ext_dir_entry *) dir_block->b_data; |
de | 435 | fs/ext/namei.c | de->inode=inode->i_ino; |
de | 436 | fs/ext/namei.c | de->rec_len=16; |
de | 437 | fs/ext/namei.c | de->name_len=1; |
de | 438 | fs/ext/namei.c | strcpy(de->name,"."); |
de | 439 | fs/ext/namei.c | de = (struct ext_dir_entry *) ((char *) de + de->rec_len); |
de | 440 | fs/ext/namei.c | de->inode = dir->i_ino; |
de | 441 | fs/ext/namei.c | de->rec_len=16; |
de | 442 | fs/ext/namei.c | de->name_len=2; |
de | 443 | fs/ext/namei.c | strcpy(de->name,".."); |
de | 451 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
de | 458 | fs/ext/namei.c | de->inode = inode->i_ino; |
de | 475 | fs/ext/namei.c | struct ext_dir_entry * de, * de1; |
de | 482 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
de | 483 | fs/ext/namei.c | de1 = (struct ext_dir_entry *) ((char *) de + de->rec_len); |
de | 484 | fs/ext/namei.c | if (de->inode != inode->i_ino || !de1->inode || |
de | 485 | fs/ext/namei.c | strcmp(".",de->name) || strcmp("..",de1->name)) { |
de | 490 | fs/ext/namei.c | offset = de->rec_len + de1->rec_len; |
de | 491 | fs/ext/namei.c | de = (struct ext_dir_entry *) ((char *) de1 + de1->rec_len); |
de | 493 | fs/ext/namei.c | if ((void *) de >= (void *) (bh->b_data+BLOCK_SIZE)) { |
de | 500 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
de | 502 | fs/ext/namei.c | if (de->rec_len < 8 || de->rec_len %4 != 0 || |
de | 503 | fs/ext/namei.c | de->rec_len < de->name_len + 8) { |
de | 508 | fs/ext/namei.c | offset, de->rec_len, de->name_len); |
de | 512 | fs/ext/namei.c | if (de->inode) { |
de | 516 | fs/ext/namei.c | offset += de->rec_len; |
de | 517 | fs/ext/namei.c | de = (struct ext_dir_entry *) ((char *) de + de->rec_len); |
de | 523 | fs/ext/namei.c | static inline void ext_merge_entries (struct ext_dir_entry * de, |
de | 527 | fs/ext/namei.c | de->rec_len += nde->rec_len; |
de | 529 | fs/ext/namei.c | pde->rec_len += de->rec_len; |
de | 537 | fs/ext/namei.c | struct ext_dir_entry * de, * pde, * nde; |
de | 540 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,&pde,&nde); |
de | 545 | fs/ext/namei.c | if (!(inode = iget(dir->i_sb, de->inode))) |
de | 569 | fs/ext/namei.c | de->inode = 0; |
de | 570 | fs/ext/namei.c | de->name_len = 0; |
de | 571 | fs/ext/namei.c | ext_merge_entries (de, pde, nde); |
de | 591 | fs/ext/namei.c | struct ext_dir_entry * de, * pde, * nde; |
de | 595 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,&pde,&nde); |
de | 598 | fs/ext/namei.c | if (!(inode = iget(dir->i_sb, de->inode))) |
de | 613 | fs/ext/namei.c | de->inode = 0; |
de | 614 | fs/ext/namei.c | de->name_len = 0; |
de | 615 | fs/ext/namei.c | ext_merge_entries (de, pde, nde); |
de | 632 | fs/ext/namei.c | struct ext_dir_entry * de; |
de | 660 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
de | 669 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
de | 677 | fs/ext/namei.c | de->inode = inode->i_ino; |
de | 687 | fs/ext/namei.c | struct ext_dir_entry * de; |
de | 700 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
de | 707 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
de | 713 | fs/ext/namei.c | de->inode = oldinode->i_ino; |
de | 73 | fs/ext2/dir.c | struct ext2_dir_entry * de, struct buffer_head * bh, |
de | 78 | fs/ext2/dir.c | if (de->rec_len < EXT2_DIR_REC_LEN(1)) |
de | 80 | fs/ext2/dir.c | else if (de->rec_len % 4 != 0) |
de | 82 | fs/ext2/dir.c | else if (de->rec_len < EXT2_DIR_REC_LEN(de->name_len)) |
de | 84 | fs/ext2/dir.c | else if (dir && ((char *) de - bh->b_data) + de->rec_len > |
de | 87 | fs/ext2/dir.c | else if (dir && de->inode > dir->i_sb->u.ext2_sb.s_es->s_inodes_count) |
de | 93 | fs/ext2/dir.c | dir->i_ino, error_msg, offset, (unsigned long) de->inode, |
de | 94 | fs/ext2/dir.c | de->rec_len, de->name_len); |
de | 105 | fs/ext2/dir.c | struct ext2_dir_entry * de; |
de | 154 | fs/ext2/dir.c | de = (struct ext2_dir_entry *) |
de | 162 | fs/ext2/dir.c | if (de->rec_len < EXT2_DIR_REC_LEN(1)) |
de | 164 | fs/ext2/dir.c | i += de->rec_len; |
de | 174 | fs/ext2/dir.c | de = (struct ext2_dir_entry *) (bh->b_data + offset); |
de | 175 | fs/ext2/dir.c | if (!ext2_check_dir_entry ("ext2_readdir", inode, de, |
de | 184 | fs/ext2/dir.c | offset += de->rec_len; |
de | 185 | fs/ext2/dir.c | if (de->inode) { |
de | 193 | fs/ext2/dir.c | dcache_add(inode, de->name, de->name_len, de->inode); |
de | 195 | fs/ext2/dir.c | error = filldir(dirent, de->name, de->name_len, filp->f_pos, de->inode); |
de | 202 | fs/ext2/dir.c | filp->f_pos += de->rec_len; |
de | 45 | fs/ext2/namei.c | struct ext2_dir_entry * de) |
de | 47 | fs/ext2/namei.c | if (!de || !de->inode || len > EXT2_NAME_LEN) |
de | 52 | fs/ext2/namei.c | if (!len && de->name_len == 1 && (de->name[0] == '.') && |
de | 53 | fs/ext2/namei.c | (de->name[1] == '\0')) |
de | 55 | fs/ext2/namei.c | if (len != de->name_len) |
de | 57 | fs/ext2/namei.c | return !memcmp(name, de->name, len); |
de | 106 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 129 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
de | 131 | fs/ext2/namei.c | while ((char *) de < dlimit) { |
de | 133 | fs/ext2/namei.c | de, bh, offset)) |
de | 135 | fs/ext2/namei.c | if (de->inode != 0 && ext2_match (namelen, name, de)) { |
de | 140 | fs/ext2/namei.c | *res_dir = de; |
de | 143 | fs/ext2/namei.c | offset += de->rec_len; |
de | 144 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) |
de | 145 | fs/ext2/namei.c | ((char *) de + de->rec_len); |
de | 169 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 192 | fs/ext2/namei.c | if (!(bh = ext2_find_entry (dir, name, len, &de))) { |
de | 198 | fs/ext2/namei.c | ino = de->inode; |
de | 227 | fs/ext2/namei.c | struct ext2_dir_entry * de, * de1; |
de | 257 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
de | 260 | fs/ext2/namei.c | if ((char *)de >= sb->s_blocksize + bh->b_data) { |
de | 274 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
de | 275 | fs/ext2/namei.c | de->inode = 0; |
de | 276 | fs/ext2/namei.c | de->rec_len = sb->s_blocksize; |
de | 283 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
de | 286 | fs/ext2/namei.c | if (!ext2_check_dir_entry ("ext2_add_entry", dir, de, bh, |
de | 292 | fs/ext2/namei.c | if (de->inode != 0 && ext2_match (namelen, name, de)) { |
de | 297 | fs/ext2/namei.c | if ((de->inode == 0 && de->rec_len >= rec_len) || |
de | 298 | fs/ext2/namei.c | (de->rec_len >= EXT2_DIR_REC_LEN(de->name_len) + rec_len)) { |
de | 299 | fs/ext2/namei.c | offset += de->rec_len; |
de | 300 | fs/ext2/namei.c | if (de->inode) { |
de | 301 | fs/ext2/namei.c | de1 = (struct ext2_dir_entry *) ((char *) de + |
de | 302 | fs/ext2/namei.c | EXT2_DIR_REC_LEN(de->name_len)); |
de | 303 | fs/ext2/namei.c | de1->rec_len = de->rec_len - |
de | 304 | fs/ext2/namei.c | EXT2_DIR_REC_LEN(de->name_len); |
de | 305 | fs/ext2/namei.c | de->rec_len = EXT2_DIR_REC_LEN(de->name_len); |
de | 306 | fs/ext2/namei.c | de = de1; |
de | 308 | fs/ext2/namei.c | de->inode = 0; |
de | 309 | fs/ext2/namei.c | de->name_len = namelen; |
de | 310 | fs/ext2/namei.c | memcpy (de->name, name, namelen); |
de | 326 | fs/ext2/namei.c | *res_dir = de; |
de | 330 | fs/ext2/namei.c | offset += de->rec_len; |
de | 331 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) ((char *) de + de->rec_len); |
de | 344 | fs/ext2/namei.c | struct ext2_dir_entry * de, * pde; |
de | 349 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
de | 352 | fs/ext2/namei.c | de, bh, i)) |
de | 354 | fs/ext2/namei.c | if (de == dir) { |
de | 360 | fs/ext2/namei.c | i += de->rec_len; |
de | 361 | fs/ext2/namei.c | pde = de; |
de | 362 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) ((char *) de + de->rec_len); |
de | 372 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 386 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
de | 394 | fs/ext2/namei.c | de->inode = inode->i_ino; |
de | 396 | fs/ext2/namei.c | dcache_add(dir, de->name, de->name_len, de->inode); |
de | 413 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 418 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
de | 450 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
de | 458 | fs/ext2/namei.c | de->inode = inode->i_ino; |
de | 460 | fs/ext2/namei.c | dcache_add(dir, de->name, de->name_len, de->inode); |
de | 476 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 481 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
de | 507 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) dir_block->b_data; |
de | 508 | fs/ext2/namei.c | de->inode = inode->i_ino; |
de | 509 | fs/ext2/namei.c | de->name_len = 1; |
de | 510 | fs/ext2/namei.c | de->rec_len = EXT2_DIR_REC_LEN(de->name_len); |
de | 511 | fs/ext2/namei.c | strcpy (de->name, "."); |
de | 512 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) ((char *) de + de->rec_len); |
de | 513 | fs/ext2/namei.c | de->inode = dir->i_ino; |
de | 514 | fs/ext2/namei.c | de->rec_len = inode->i_sb->s_blocksize - EXT2_DIR_REC_LEN(1); |
de | 515 | fs/ext2/namei.c | de->name_len = 2; |
de | 516 | fs/ext2/namei.c | strcpy (de->name, ".."); |
de | 524 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
de | 532 | fs/ext2/namei.c | de->inode = inode->i_ino; |
de | 534 | fs/ext2/namei.c | dcache_add(dir, de->name, de->name_len, de->inode); |
de | 555 | fs/ext2/namei.c | struct ext2_dir_entry * de, * de1; |
de | 567 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
de | 568 | fs/ext2/namei.c | de1 = (struct ext2_dir_entry *) ((char *) de + de->rec_len); |
de | 569 | fs/ext2/namei.c | if (de->inode != inode->i_ino || !de1->inode || |
de | 570 | fs/ext2/namei.c | strcmp (".", de->name) || strcmp ("..", de1->name)) { |
de | 576 | fs/ext2/namei.c | offset = de->rec_len + de1->rec_len; |
de | 577 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) ((char *) de1 + de1->rec_len); |
de | 579 | fs/ext2/namei.c | if ((void *) de >= (void *) (bh->b_data + sb->s_blocksize)) { |
de | 589 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
de | 591 | fs/ext2/namei.c | if (!ext2_check_dir_entry ("empty_dir", inode, de, bh, |
de | 596 | fs/ext2/namei.c | if (de->inode) { |
de | 600 | fs/ext2/namei.c | offset += de->rec_len; |
de | 601 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) ((char *) de + de->rec_len); |
de | 612 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 618 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
de | 623 | fs/ext2/namei.c | if (!(inode = iget (dir->i_sb, de->inode))) |
de | 627 | fs/ext2/namei.c | if (de->inode != inode->i_ino) { |
de | 647 | fs/ext2/namei.c | else if (de->inode != inode->i_ino) |
de | 660 | fs/ext2/namei.c | retval = ext2_delete_entry (de, bh); |
de | 693 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 700 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
de | 703 | fs/ext2/namei.c | if (!(inode = iget (dir->i_sb, de->inode))) |
de | 710 | fs/ext2/namei.c | if (de->inode != inode->i_ino) { |
de | 727 | fs/ext2/namei.c | retval = ext2_delete_entry (de, bh); |
de | 752 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 798 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
de | 807 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
de | 815 | fs/ext2/namei.c | de->inode = inode->i_ino; |
de | 817 | fs/ext2/namei.c | dcache_add(dir, de->name, de->name_len, de->inode); |
de | 832 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 851 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
de | 858 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
de | 864 | fs/ext2/namei.c | de->inode = oldinode->i_ino; |
de | 866 | fs/ext2/namei.c | dcache_add(dir, de->name, de->name_len, de->inode); |
de | 270 | fs/hpfs/hpfs.h | static inline dnode_secno de_down_pointer (struct hpfs_dirent *de) |
de | 272 | fs/hpfs/hpfs.h | return *(dnode_secno *) ((void *) de + de->length - 4); |
de | 291 | fs/hpfs/hpfs.h | static inline struct hpfs_dirent *de_next_de (struct hpfs_dirent *de) |
de | 293 | fs/hpfs/hpfs.h | return (void *) de + de->length; |
de | 336 | fs/hpfs/hpfs_fs.c | struct hpfs_dirent *de; |
de | 499 | fs/hpfs/hpfs_fs.c | de = map_dirent(s->s_mounted, root_dno, "\001\001", 2, &qbh); |
de | 500 | fs/hpfs/hpfs_fs.c | if (!root_dno || !de) { |
de | 508 | fs/hpfs/hpfs_fs.c | s->s_mounted->i_atime = local_to_gmt(de->read_date); |
de | 509 | fs/hpfs/hpfs_fs.c | s->s_mounted->i_mtime = local_to_gmt(de->write_date); |
de | 510 | fs/hpfs/hpfs_fs.c | s->s_mounted->i_ctime = local_to_gmt(de->creation_date); |
de | 781 | fs/hpfs/hpfs_fs.c | struct hpfs_dirent *de; |
de | 787 | fs/hpfs/hpfs_fs.c | de = dnode_first_de(dnode); |
de | 792 | fs/hpfs/hpfs_fs.c | for (; de < de_end; de = de_next_de(de)) { |
de | 793 | fs/hpfs/hpfs_fs.c | if (de->down) |
de | 794 | fs/hpfs/hpfs_fs.c | count_dnodes(inode, de_down_pointer(de), |
de | 796 | fs/hpfs/hpfs_fs.c | if (de->directory && !de->first) |
de | 798 | fs/hpfs/hpfs_fs.c | if (de->last || de->length == 0) |
de | 1114 | fs/hpfs/hpfs_fs.c | struct hpfs_dirent *de; |
de | 1132 | fs/hpfs/hpfs_fs.c | de = map_dirent(dir, dir->i_hpfs_dno, "\001\001", 2, &qbh); |
de | 1134 | fs/hpfs/hpfs_fs.c | de = map_dirent(dir, |
de | 1138 | fs/hpfs/hpfs_fs.c | de = map_dirent(dir, dir->i_hpfs_dno, name, len, &qbh); |
de | 1144 | fs/hpfs/hpfs_fs.c | if (!de) |
de | 1151 | fs/hpfs/hpfs_fs.c | if (de->directory) |
de | 1152 | fs/hpfs/hpfs_fs.c | ino = dir_ino(de->fnode); |
de | 1154 | fs/hpfs/hpfs_fs.c | ino = file_ino(de->fnode); |
de | 1169 | fs/hpfs/hpfs_fs.c | inode->i_atime = local_to_gmt(de->read_date); |
de | 1170 | fs/hpfs/hpfs_fs.c | inode->i_mtime = local_to_gmt(de->write_date); |
de | 1171 | fs/hpfs/hpfs_fs.c | inode->i_ctime = local_to_gmt(de->creation_date); |
de | 1172 | fs/hpfs/hpfs_fs.c | if (de->read_only) |
de | 1174 | fs/hpfs/hpfs_fs.c | if (!de->directory) { |
de | 1175 | fs/hpfs/hpfs_fs.c | inode->i_size = de->file_size; |
de | 1237 | fs/hpfs/hpfs_fs.c | struct hpfs_dirent *de; |
de | 1251 | fs/hpfs/hpfs_fs.c | de = dnode_first_de(dnode); |
de | 1257 | fs/hpfs/hpfs_fs.c | for ( ; de < de_end; de = de_next_de(de)) { |
de | 1262 | fs/hpfs/hpfs_fs.c | l = len < de->namelen ? len : de->namelen; |
de | 1263 | fs/hpfs/hpfs_fs.c | t = memcasecmp(name, de->name, l); |
de | 1269 | fs/hpfs/hpfs_fs.c | t = len - de->namelen; |
de | 1272 | fs/hpfs/hpfs_fs.c | return de; |
de | 1282 | fs/hpfs/hpfs_fs.c | if (de->down) { |
de | 1283 | fs/hpfs/hpfs_fs.c | dnode_secno sub_dno = de_down_pointer(de); |
de | 1298 | fs/hpfs/hpfs_fs.c | if (de->last || de->length == 0) |
de | 1362 | fs/hpfs/hpfs_fs.c | struct hpfs_dirent *de; |
de | 1397 | fs/hpfs/hpfs_fs.c | de = map_pos_dirent(inode, &filp->f_pos, &qbh); |
de | 1398 | fs/hpfs/hpfs_fs.c | if (!de) { |
de | 1402 | fs/hpfs/hpfs_fs.c | namelen = de->namelen; |
de | 1403 | fs/hpfs/hpfs_fs.c | translate_hpfs_name(de->name, namelen, tempname, lc); |
de | 1404 | fs/hpfs/hpfs_fs.c | if (de->directory) |
de | 1405 | fs/hpfs/hpfs_fs.c | ino = dir_ino(de->fnode); |
de | 1407 | fs/hpfs/hpfs_fs.c | ino = file_ino(de->fnode); |
de | 1429 | fs/hpfs/hpfs_fs.c | struct hpfs_dirent *de; |
de | 1452 | fs/hpfs/hpfs_fs.c | de = map_nth_dirent(inode->i_dev, dno, r, qbh); |
de | 1458 | fs/hpfs/hpfs_fs.c | if (!de) { |
de | 1469 | fs/hpfs/hpfs_fs.c | if (de->down) |
de | 1478 | fs/hpfs/hpfs_fs.c | if (de->first || de->last) { |
de | 1483 | fs/hpfs/hpfs_fs.c | return de; |
de | 1492 | fs/hpfs/hpfs_fs.c | struct hpfs_dirent *de; |
de | 1528 | fs/hpfs/hpfs_fs.c | de = map_nth_dirent(inode->i_dev, dno, r, &qbh); |
de | 1529 | fs/hpfs/hpfs_fs.c | if (!de || !de->down) |
de | 1535 | fs/hpfs/hpfs_fs.c | dno = de_down_pointer(de); |
de | 1556 | fs/hpfs/hpfs_fs.c | struct hpfs_dirent *de, *de_end; |
de | 1559 | fs/hpfs/hpfs_fs.c | de = dnode_first_de(dnode); |
de | 1562 | fs/hpfs/hpfs_fs.c | for (i = 1; de < de_end; i++, de = de_next_de(de)) { |
de | 1564 | fs/hpfs/hpfs_fs.c | return de; |
de | 1565 | fs/hpfs/hpfs_fs.c | if (de->last || de->length == 0) |
de | 61 | fs/isofs/dir.c | static int parent_inode_number(struct inode * inode, struct iso_directory_record * de) |
de | 72 | fs/isofs/dir.c | return isofs_lookup_grandparent(inode, find_rock_ridge_relocation(de, inode)); |
de | 118 | fs/isofs/dir.c | struct iso_directory_record *de; |
de | 148 | fs/isofs/dir.c | de = (struct iso_directory_record *) (bh->b_data + offset); |
de | 151 | fs/isofs/dir.c | de_len = *(unsigned char *) de; |
de | 177 | fs/isofs/dir.c | memcpy(tmpde, de, bufsize - offset); |
de | 186 | fs/isofs/dir.c | de = tmpde; |
de | 191 | fs/isofs/dir.c | if (de->name_len[0] == 1 && de->name[0] == 0) { |
de | 199 | fs/isofs/dir.c | if (de->name_len[0] == 1 && de->name[0] == 1) { |
de | 200 | fs/isofs/dir.c | inode_number = parent_inode_number(inode, de); |
de | 215 | fs/isofs/dir.c | if (de->flags[-high_sierra] & 5) { |
de | 222 | fs/isofs/dir.c | len = de->name_len[0]; |
de | 223 | fs/isofs/dir.c | name = de->name; |
de | 224 | fs/isofs/dir.c | rrflag = get_rock_ridge_filename(de, &name, &len, inode); |
de | 642 | fs/isofs/inode.c | struct iso_directory_record * de; |
de | 649 | fs/isofs/inode.c | de = (struct iso_directory_record *) (bh->b_data + offset); |
de | 650 | fs/isofs/inode.c | if (*((unsigned char *) de) == 0) |
de | 656 | fs/isofs/inode.c | offset += *((unsigned char *) de); |
de | 666 | fs/isofs/inode.c | if (de->name_len[0] == 1 && de->name[0] == 1) |
de | 668 | fs/isofs/inode.c | parent_dir = find_rock_ridge_relocation(de, parent); |
de | 669 | fs/isofs/inode.c | directory_size = isonum_733 (de->size); |
de | 688 | fs/isofs/inode.c | de = (struct iso_directory_record *) (bh->b_data + offset); |
de | 695 | fs/isofs/inode.c | if (*((unsigned char *) de) == 0) |
de | 715 | fs/isofs/inode.c | offset += *((unsigned char *) de); |
de | 721 | fs/isofs/inode.c | cpnt = kmalloc(*((unsigned char *) de),GFP_KERNEL); |
de | 724 | fs/isofs/inode.c | de = (struct iso_directory_record *) ((char *)cpnt); |
de | 737 | fs/isofs/inode.c | if (find_rock_ridge_relocation(de, parent) == extent){ |
de | 45 | fs/isofs/namei.c | if (len <= 2) printk("Match: %d %d %s %d %d \n",len,dlen,compare,de->name[0], dlen); |
de | 73 | fs/isofs/namei.c | struct iso_directory_record * de; |
de | 89 | fs/isofs/namei.c | de = (struct iso_directory_record *) (bh->b_data + offset); |
de | 96 | fs/isofs/namei.c | if (*((unsigned char *) de) == 0) { |
de | 108 | fs/isofs/namei.c | offset += *((unsigned char *) de); |
de | 109 | fs/isofs/namei.c | f_pos += *((unsigned char *) de); |
de | 116 | fs/isofs/namei.c | cpnt = kmalloc(*((unsigned char *) de),GFP_KERNEL); |
de | 120 | fs/isofs/namei.c | de = (struct iso_directory_record *) cpnt; |
de | 133 | fs/isofs/namei.c | if (de->name[0]==0 && de->name_len[0]==1) { |
de | 140 | fs/isofs/namei.c | if (de->name[0]==1 && de->name_len[0]==1) { |
de | 153 | fs/isofs/namei.c | dlen = de->name_len[0]; |
de | 154 | fs/isofs/namei.c | dpnt = de->name; |
de | 156 | fs/isofs/namei.c | rrflag = get_rock_ridge_filename(de, &dpnt, &dlen, dir); |
de | 169 | fs/isofs/namei.c | de->name[i] = c; |
de | 181 | fs/isofs/namei.c | if( !(de->flags[-dir->i_sb->u.isofs_sb.s_high_sierra] & 5) |
de | 199 | fs/isofs/namei.c | find_rock_ridge_relocation(de,dir)); |
de | 97 | fs/isofs/rock.c | int find_rock_ridge_relocation(struct iso_directory_record * de, |
de | 109 | fs/isofs/rock.c | if (de->name[0]==1 && de->name_len[0]==1) flag = 1; |
de | 111 | fs/isofs/rock.c | retval = isonum_733 (de->extent); |
de | 115 | fs/isofs/rock.c | SETUP_ROCK_RIDGE(de, chr, len); |
de | 170 | fs/isofs/rock.c | int get_rock_ridge_filename(struct iso_directory_record * de, |
de | 181 | fs/isofs/rock.c | SETUP_ROCK_RIDGE(de, chr, len); |
de | 254 | fs/isofs/rock.c | int parse_rock_ridge_inode(struct iso_directory_record * de, |
de | 262 | fs/isofs/rock.c | SETUP_ROCK_RIDGE(de, chr, len); |
de | 63 | fs/minix/dir.c | struct minix_dir_entry * de; |
de | 79 | fs/minix/dir.c | de = (struct minix_dir_entry *) (offset + bh->b_data); |
de | 80 | fs/minix/dir.c | if (de->inode) { |
de | 81 | fs/minix/dir.c | int size = strnlen(de->name, info->s_namelen); |
de | 82 | fs/minix/dir.c | if (filldir(dirent, de->name, size, filp->f_pos, de->inode) < 0) { |
de | 44 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 46 | fs/minix/namei.c | de = (struct minix_dir_entry *) (bh->b_data + *offset); |
de | 48 | fs/minix/namei.c | if (!de->inode || len > info->s_namelen) |
de | 51 | fs/minix/namei.c | if (!len && (de->name[0]=='.') && (de->name[1]=='\0')) |
de | 53 | fs/minix/namei.c | return namecompare(len,info->s_namelen,name,de->name); |
de | 111 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 121 | fs/minix/namei.c | if (!(bh = minix_find_entry(dir,name,len,&de))) { |
de | 125 | fs/minix/namei.c | ino = de->inode; |
de | 153 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 178 | fs/minix/namei.c | de = (struct minix_dir_entry *) (bh->b_data + offset); |
de | 181 | fs/minix/namei.c | de->inode = 0; |
de | 185 | fs/minix/namei.c | if (de->inode) { |
de | 186 | fs/minix/namei.c | if (namecompare(namelen, info->s_namelen, name, de->name)) { |
de | 194 | fs/minix/namei.c | de->name[i] = (i < namelen) ? name[i] : 0; |
de | 197 | fs/minix/namei.c | *res_dir = de; |
de | 217 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 230 | fs/minix/namei.c | error = minix_add_entry(dir,name,len, &bh ,&de); |
de | 238 | fs/minix/namei.c | de->inode = inode->i_ino; |
de | 251 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 255 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
de | 287 | fs/minix/namei.c | error = minix_add_entry(dir, name, len, &bh, &de); |
de | 295 | fs/minix/namei.c | de->inode = inode->i_ino; |
de | 308 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 316 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
de | 341 | fs/minix/namei.c | de = (struct minix_dir_entry *) dir_block->b_data; |
de | 342 | fs/minix/namei.c | de->inode=inode->i_ino; |
de | 343 | fs/minix/namei.c | strcpy(de->name,"."); |
de | 344 | fs/minix/namei.c | de = (struct minix_dir_entry *) (dir_block->b_data + info->s_dirsize); |
de | 345 | fs/minix/namei.c | de->inode = dir->i_ino; |
de | 346 | fs/minix/namei.c | strcpy(de->name,".."); |
de | 354 | fs/minix/namei.c | error = minix_add_entry(dir, name, len, &bh, &de); |
de | 361 | fs/minix/namei.c | de->inode = inode->i_ino; |
de | 378 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 394 | fs/minix/namei.c | de = (struct minix_dir_entry *) bh->b_data; |
de | 395 | fs/minix/namei.c | if (!de->inode || strcmp(de->name,".")) |
de | 397 | fs/minix/namei.c | de = (struct minix_dir_entry *) (bh->b_data + info->s_dirsize); |
de | 398 | fs/minix/namei.c | if (!de->inode || strcmp(de->name,"..")) |
de | 408 | fs/minix/namei.c | de = (struct minix_dir_entry *) (bh->b_data + offset); |
de | 410 | fs/minix/namei.c | if (de->inode) { |
de | 435 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 438 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
de | 443 | fs/minix/namei.c | if (!(inode = iget(dir->i_sb, de->inode))) |
de | 461 | fs/minix/namei.c | if (de->inode != inode->i_ino) { |
de | 471 | fs/minix/namei.c | de->inode = 0; |
de | 492 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 497 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
de | 500 | fs/minix/namei.c | if (!(inode = iget(dir->i_sb, de->inode))) |
de | 505 | fs/minix/namei.c | if (de->inode != inode->i_ino) { |
de | 516 | fs/minix/namei.c | if (de->inode != inode->i_ino) { |
de | 526 | fs/minix/namei.c | de->inode = 0; |
de | 544 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 572 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
de | 581 | fs/minix/namei.c | i = minix_add_entry(dir, name, len, &bh, &de); |
de | 589 | fs/minix/namei.c | de->inode = inode->i_ino; |
de | 600 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 613 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
de | 620 | fs/minix/namei.c | error = minix_add_entry(dir, name, len, &bh, &de); |
de | 626 | fs/minix/namei.c | de->inode = oldinode->i_ino; |
de | 69 | fs/msdos/dir.c | struct msdos_dir_entry *de; |
de | 88 | fs/msdos/dir.c | while ((ino = msdos_get_entry(inode,&filp->f_pos,&bh,&de)) > -1) { |
de | 89 | fs/msdos/dir.c | if (!IS_FREE(de->name) && !(de->attr & ATTR_VOLUME)) { |
de | 93 | fs/msdos/dir.c | if ((de->attr & ATTR_HIDDEN) && MSDOS_SB(sb)->dotsOK) { |
de | 99 | fs/msdos/dir.c | if (!(c = de->name[i])) break; |
de | 111 | fs/msdos/dir.c | if (!(c = de->ext[i2])) break; |
de | 119 | fs/msdos/dir.c | if (!strcmp(de->name,MSDOS_DOT)) |
de | 121 | fs/msdos/dir.c | else if (!strcmp(de->name,MSDOS_DOTDOT)) |
de | 284 | fs/msdos/misc.c | struct msdos_dir_entry **de) |
de | 306 | fs/msdos/misc.c | *de = (struct msdos_dir_entry *) ((*bh)->b_data+(offset & |
de | 111 | fs/msdos/namei.c | struct buffer_head **bh,struct msdos_dir_entry **de,int *ino) |
de | 133 | fs/msdos/namei.c | return msdos_scan(dir,msdos_name,bh,de,ino,scantype); |
de | 142 | fs/msdos/namei.c | struct msdos_dir_entry *de; |
de | 167 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) { |
de | 208 | fs/msdos/namei.c | struct msdos_dir_entry *de; |
de | 211 | fs/msdos/namei.c | if ((res = msdos_scan(dir,NULL,&bh,&de,&ino,SCAN_ANY)) < 0) { |
de | 215 | fs/msdos/namei.c | if ((res = msdos_scan(dir,NULL,&bh,&de,&ino,SCAN_ANY)) < 0) return res; |
de | 222 | fs/msdos/namei.c | memcpy(de->name,name,MSDOS_NAME); |
de | 223 | fs/msdos/namei.c | memset(de->unused, 0, sizeof(de->unused)); |
de | 224 | fs/msdos/namei.c | de->attr = is_dir ? ATTR_DIR : ATTR_ARCH; |
de | 225 | fs/msdos/namei.c | de->attr = is_hid ? (de->attr|ATTR_HIDDEN) : (de->attr&~ATTR_HIDDEN); |
de | 226 | fs/msdos/namei.c | de->start = 0; |
de | 227 | fs/msdos/namei.c | date_unix2dos(dir->i_mtime,&de->time,&de->date); |
de | 228 | fs/msdos/namei.c | de->size = 0; |
de | 246 | fs/msdos/namei.c | struct msdos_dir_entry *de; |
de | 262 | fs/msdos/namei.c | if (msdos_scan(dir,msdos_name,&bh,&de,&ino,SCAN_HID) >= 0) { |
de | 268 | fs/msdos/namei.c | if (msdos_scan(dir,msdos_name,&bh,&de,&ino,SCAN_NOTHID) >= 0) { |
de | 305 | fs/msdos/namei.c | struct msdos_dir_entry *de; |
de | 317 | fs/msdos/namei.c | if (msdos_scan(dir,msdos_name,&bh,&de,&ino,SCAN_ANY) >= 0) { |
de | 365 | fs/msdos/namei.c | struct msdos_dir_entry *de; |
de | 372 | fs/msdos/namei.c | while (msdos_get_entry(dir,&pos,&bh,&de) > -1) |
de | 373 | fs/msdos/namei.c | if (!IS_FREE(de->name) && strncmp(de->name,MSDOS_DOT, |
de | 374 | fs/msdos/namei.c | MSDOS_NAME) && strncmp(de->name,MSDOS_DOTDOT, |
de | 391 | fs/msdos/namei.c | struct msdos_dir_entry *de; |
de | 399 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) goto rmdir_done; |
de | 414 | fs/msdos/namei.c | de->name[0] = DELETED_FLAG; |
de | 434 | fs/msdos/namei.c | struct msdos_dir_entry *de; |
de | 439 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) |
de | 457 | fs/msdos/namei.c | de->name[0] = DELETED_FLAG; |
de | 74 | fs/proc/inode.c | struct inode * proc_get_inode(struct super_block * s, int ino, struct proc_dir_entry * de) |
de | 78 | fs/proc/inode.c | inode->u.generic_ip = (void *) de; |
de | 79 | fs/proc/inode.c | if (de) { |
de | 80 | fs/proc/inode.c | if (de->mode) { |
de | 81 | fs/proc/inode.c | inode->i_mode = de->mode; |
de | 82 | fs/proc/inode.c | inode->i_uid = de->uid; |
de | 83 | fs/proc/inode.c | inode->i_gid = de->gid; |
de | 85 | fs/proc/inode.c | if (de->size) |
de | 86 | fs/proc/inode.c | inode->i_size = de->size; |
de | 87 | fs/proc/inode.c | if (de->ops) |
de | 88 | fs/proc/inode.c | inode->i_op = de->ops; |
de | 89 | fs/proc/inode.c | if (de->nlink) |
de | 90 | fs/proc/inode.c | inode->i_nlink = de->nlink; |
de | 91 | fs/proc/inode.c | if (de->fill_inode) |
de | 92 | fs/proc/inode.c | de->fill_inode(inode); |
de | 306 | fs/proc/root.c | int proc_match(int len,const char * name,struct proc_dir_entry * de) |
de | 308 | fs/proc/root.c | if (!de || !de->low_ino) |
de | 311 | fs/proc/root.c | if (!len && (de->name[0]=='.') && (de->name[1]=='\0')) |
de | 313 | fs/proc/root.c | if (de->namelen != len) |
de | 315 | fs/proc/root.c | return !memcmp(name, de->name, len); |
de | 321 | fs/proc/root.c | struct proc_dir_entry * de; |
de | 330 | fs/proc/root.c | de = (struct proc_dir_entry *) dir->u.generic_ip; |
de | 331 | fs/proc/root.c | if (!de) { |
de | 345 | fs/proc/root.c | inode = proc_get_inode(dir->i_sb, de->parent->low_ino, de->parent); |
de | 355 | fs/proc/root.c | for (de = de->subdir; de ; de = de->next) { |
de | 356 | fs/proc/root.c | if (proc_match(len, name, de)) |
de | 359 | fs/proc/root.c | if (!de) { |
de | 364 | fs/proc/root.c | ino = de->low_ino | (dir->i_ino & ~(0xffff)); |
de | 366 | fs/proc/root.c | if (!(*result = proc_get_inode(dir->i_sb, ino, de))) { |
de | 430 | fs/proc/root.c | struct proc_dir_entry * de; |
de | 437 | fs/proc/root.c | de = (struct proc_dir_entry *) inode->u.generic_ip; |
de | 438 | fs/proc/root.c | if (!de) |
de | 449 | fs/proc/root.c | if (filldir(dirent, "..", 2, i, de->parent->low_ino) < 0) |
de | 456 | fs/proc/root.c | de = de->subdir; |
de | 459 | fs/proc/root.c | if (!de) |
de | 463 | fs/proc/root.c | de = de->next; |
de | 468 | fs/proc/root.c | if (filldir(dirent, de->name, de->namelen, filp->f_pos, ino | de->low_ino) < 0) |
de | 471 | fs/proc/root.c | de = de->next; |
de | 472 | fs/proc/root.c | } while (de); |
de | 24 | fs/readdir.c | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de))) |
de | 18 | fs/smbfs/dir.c | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de))) |
de | 72 | fs/sysv/dir.c | struct sysv_dir_entry * de, sde; |
de | 87 | fs/sysv/dir.c | de = (struct sysv_dir_entry *) (offset + bh_data); |
de | 88 | fs/sysv/dir.c | if (de->inode) { |
de | 92 | fs/sysv/dir.c | memcpy(&sde, de, sizeof(struct sysv_dir_entry)); |
de | 42 | fs/sysv/namei.c | static int sysv_match(int len, const char * name, struct sysv_dir_entry * de) |
de | 44 | fs/sysv/namei.c | if (!de->inode || len > SYSV_NAMELEN) |
de | 47 | fs/sysv/namei.c | if (!len && (de->name[0]=='.') && (de->name[1]=='\0')) |
de | 49 | fs/sysv/namei.c | return namecompare(len,SYSV_NAMELEN,name,de->name); |
de | 107 | fs/sysv/namei.c | struct sysv_dir_entry * de; |
de | 117 | fs/sysv/namei.c | if (!(bh = sysv_find_entry(dir,name,len,&de))) { |
de | 121 | fs/sysv/namei.c | ino = de->inode; |
de | 150 | fs/sysv/namei.c | struct sysv_dir_entry * de; |
de | 172 | fs/sysv/namei.c | de = (struct sysv_dir_entry *) (bh->b_data + offset); |
de | 176 | fs/sysv/namei.c | de->inode = 0; |
de | 180 | fs/sysv/namei.c | if (de->inode) { |
de | 181 | fs/sysv/namei.c | if (namecompare(namelen, SYSV_NAMELEN, name, de->name)) { |
de | 189 | fs/sysv/namei.c | de->name[i] = (i < namelen) ? name[i] : 0; |
de | 191 | fs/sysv/namei.c | *res_dir = de; |
de | 210 | fs/sysv/namei.c | struct sysv_dir_entry * de; |
de | 223 | fs/sysv/namei.c | error = sysv_add_entry(dir,name,len, &bh ,&de); |
de | 231 | fs/sysv/namei.c | de->inode = inode->i_ino; |
de | 244 | fs/sysv/namei.c | struct sysv_dir_entry * de; |
de | 248 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
de | 280 | fs/sysv/namei.c | error = sysv_add_entry(dir, name, len, &bh, &de); |
de | 288 | fs/sysv/namei.c | de->inode = inode->i_ino; |
de | 301 | fs/sysv/namei.c | struct sysv_dir_entry * de; |
de | 307 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
de | 332 | fs/sysv/namei.c | de = (struct sysv_dir_entry *) (dir_block->b_data + 0*SYSV_DIRSIZE); |
de | 333 | fs/sysv/namei.c | de->inode = inode->i_ino; |
de | 334 | fs/sysv/namei.c | strcpy(de->name,"."); /* rest of de->name is zero, see sysv_new_block */ |
de | 335 | fs/sysv/namei.c | de = (struct sysv_dir_entry *) (dir_block->b_data + 1*SYSV_DIRSIZE); |
de | 336 | fs/sysv/namei.c | de->inode = dir->i_ino; |
de | 337 | fs/sysv/namei.c | strcpy(de->name,".."); /* rest of de->name is zero, see sysv_new_block */ |
de | 345 | fs/sysv/namei.c | error = sysv_add_entry(dir, name, len, &bh, &de); |
de | 352 | fs/sysv/namei.c | de->inode = inode->i_ino; |
de | 370 | fs/sysv/namei.c | struct sysv_dir_entry * de; |
de | 384 | fs/sysv/namei.c | de = (struct sysv_dir_entry *) (bh->b_data + 0*SYSV_DIRSIZE); |
de | 385 | fs/sysv/namei.c | if (!de->inode || strcmp(de->name,".")) |
de | 387 | fs/sysv/namei.c | de = (struct sysv_dir_entry *) (bh->b_data + 1*SYSV_DIRSIZE); |
de | 388 | fs/sysv/namei.c | if (!de->inode || strcmp(de->name,"..")) |
de | 400 | fs/sysv/namei.c | de = (struct sysv_dir_entry *) (bh->b_data + offset); |
de | 403 | fs/sysv/namei.c | if (de->inode) { |
de | 427 | fs/sysv/namei.c | struct sysv_dir_entry * de; |
de | 430 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
de | 435 | fs/sysv/namei.c | if (!(inode = iget(dir->i_sb, de->inode))) |
de | 453 | fs/sysv/namei.c | if (de->inode != inode->i_ino) { |
de | 463 | fs/sysv/namei.c | de->inode = 0; |
de | 483 | fs/sysv/namei.c | struct sysv_dir_entry * de; |
de | 488 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
de | 491 | fs/sysv/namei.c | if (!(inode = iget(dir->i_sb, de->inode))) |
de | 496 | fs/sysv/namei.c | if (de->inode != inode->i_ino) { |
de | 507 | fs/sysv/namei.c | if (de->inode != inode->i_ino) { |
de | 517 | fs/sysv/namei.c | de->inode = 0; |
de | 534 | fs/sysv/namei.c | struct sysv_dir_entry * de; |
de | 567 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
de | 576 | fs/sysv/namei.c | i = sysv_add_entry(dir, name, len, &bh, &de); |
de | 584 | fs/sysv/namei.c | de->inode = inode->i_ino; |
de | 595 | fs/sysv/namei.c | struct sysv_dir_entry * de; |
de | 608 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
de | 615 | fs/sysv/namei.c | error = sysv_add_entry(dir, name, len, &bh, &de); |
de | 621 | fs/sysv/namei.c | de->inode = oldinode->i_ino; |
de | 71 | fs/xiafs/dir.c | struct xiafs_direct * de; |
de | 85 | fs/xiafs/dir.c | de = (struct xiafs_direct *) (bh->b_data + i); |
de | 86 | fs/xiafs/dir.c | if (!de->d_rec_len) |
de | 88 | fs/xiafs/dir.c | i += de->d_rec_len; |
de | 91 | fs/xiafs/dir.c | de = (struct xiafs_direct *) (offset + bh->b_data); |
de | 94 | fs/xiafs/dir.c | if (de->d_ino > inode->i_sb->u.xiafs_sb.s_ninodes || |
de | 95 | fs/xiafs/dir.c | de->d_rec_len < 12 || |
de | 96 | fs/xiafs/dir.c | (char *)de+de->d_rec_len > XIAFS_ZSIZE(inode->i_sb)+bh->b_data || |
de | 97 | fs/xiafs/dir.c | de->d_name_len < 1 || de->d_name_len + 8 > de->d_rec_len || |
de | 98 | fs/xiafs/dir.c | de->d_name_len > _XIAFS_NAME_LEN || |
de | 99 | fs/xiafs/dir.c | de->d_name[de->d_name_len] ) { |
de | 104 | fs/xiafs/dir.c | if (de->d_ino) { |
de | 109 | fs/xiafs/dir.c | if (filldir(dirent, de->d_name, de->d_name_len, filp->f_pos, de->d_ino) < 0) { |
de | 114 | fs/xiafs/dir.c | offset += de->d_rec_len; |
de | 115 | fs/xiafs/dir.c | filp->f_pos += de->d_rec_len; |
de | 116 | fs/xiafs/dir.c | de = (struct xiafs_direct *) (offset + bh->b_data); |
de | 160 | fs/xiafs/namei.c | struct xiafs_direct * de, * de_pre; |
de | 175 | fs/xiafs/namei.c | de_pre=de=(struct xiafs_direct *)bh->b_data; |
de | 177 | fs/xiafs/namei.c | if (de->d_rec_len != 12 || !de->d_ino || de->d_name_len != 1 || |
de | 178 | fs/xiafs/namei.c | strcmp(de->d_name, ".")) { |
de | 184 | fs/xiafs/namei.c | de_pre=de=(struct xiafs_direct *)(bh->b_data+12); |
de | 189 | fs/xiafs/namei.c | de->d_ino=0; |
de | 190 | fs/xiafs/namei.c | de->d_name_len=0; |
de | 191 | fs/xiafs/namei.c | de->d_name[0]=0; |
de | 192 | fs/xiafs/namei.c | de->d_rec_len=XIAFS_ZSIZE(dir->i_sb); |
de | 196 | fs/xiafs/namei.c | if (de->d_ino > dir->i_sb->u.xiafs_sb.s_ninodes || |
de | 197 | fs/xiafs/namei.c | de->d_rec_len < 12 || |
de | 198 | fs/xiafs/namei.c | (char *)de+de->d_rec_len > bh->b_data+XIAFS_ZSIZE(dir->i_sb) || |
de | 199 | fs/xiafs/namei.c | de->d_name_len + 8 > de->d_rec_len || |
de | 200 | fs/xiafs/namei.c | de->d_name[de->d_name_len]) { |
de | 205 | fs/xiafs/namei.c | if (de->d_ino && |
de | 206 | fs/xiafs/namei.c | RNDUP4(de->d_name_len)+RNDUP4(namelen)+16<=de->d_rec_len) { |
de | 207 | fs/xiafs/namei.c | i=RNDUP4(de->d_name_len)+8; |
de | 208 | fs/xiafs/namei.c | de_pre=de; |
de | 209 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(i+(u_char *)de_pre); |
de | 210 | fs/xiafs/namei.c | de->d_ino=0; |
de | 211 | fs/xiafs/namei.c | de->d_rec_len=de_pre->d_rec_len-i; |
de | 215 | fs/xiafs/namei.c | if (!de->d_ino && RNDUP4(namelen)+8 <= de->d_rec_len) { |
de | 222 | fs/xiafs/namei.c | memcpy(de->d_name, name, namelen); |
de | 223 | fs/xiafs/namei.c | de->d_name[namelen]=0; |
de | 224 | fs/xiafs/namei.c | de->d_name_len=namelen; |
de | 226 | fs/xiafs/namei.c | *res_dir = de; |
de | 231 | fs/xiafs/namei.c | offset+=de->d_rec_len; |
de | 232 | fs/xiafs/namei.c | de_pre=de; |
de | 233 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(bh->b_data+offset); |
de | 250 | fs/xiafs/namei.c | struct xiafs_direct * de; |
de | 263 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
de | 271 | fs/xiafs/namei.c | de->d_ino = inode->i_ino; |
de | 283 | fs/xiafs/namei.c | struct xiafs_direct * de; |
de | 287 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir,name,len,&de, NULL); |
de | 320 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
de | 328 | fs/xiafs/namei.c | de->d_ino = inode->i_ino; |
de | 340 | fs/xiafs/namei.c | struct xiafs_direct * de; |
de | 342 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir,name,len,&de, NULL); |
de | 369 | fs/xiafs/namei.c | de = (struct xiafs_direct *) dir_block->b_data; |
de | 370 | fs/xiafs/namei.c | de->d_ino=inode->i_ino; |
de | 371 | fs/xiafs/namei.c | strcpy(de->d_name,"."); |
de | 372 | fs/xiafs/namei.c | de->d_name_len=1; |
de | 373 | fs/xiafs/namei.c | de->d_rec_len=12; |
de | 374 | fs/xiafs/namei.c | de =(struct xiafs_direct *)(12 + dir_block->b_data); |
de | 375 | fs/xiafs/namei.c | de->d_ino = dir->i_ino; |
de | 376 | fs/xiafs/namei.c | strcpy(de->d_name,".."); |
de | 377 | fs/xiafs/namei.c | de->d_name_len=2; |
de | 378 | fs/xiafs/namei.c | de->d_rec_len=XIAFS_ZSIZE(dir->i_sb)-12; |
de | 386 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
de | 393 | fs/xiafs/namei.c | de->d_ino = inode->i_ino; |
de | 410 | fs/xiafs/namei.c | struct xiafs_direct * de; |
de | 425 | fs/xiafs/namei.c | de=(struct xiafs_direct *)bh->b_data; |
de | 426 | fs/xiafs/namei.c | if (de->d_ino != inode->i_ino || strcmp(".", de->d_name) || |
de | 427 | fs/xiafs/namei.c | de->d_rec_len != 12 ) { |
de | 432 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(12 + bh->b_data); |
de | 433 | fs/xiafs/namei.c | if (!de->d_ino || strcmp("..", de->d_name)) { |
de | 438 | fs/xiafs/namei.c | offset=de->d_rec_len+12; |
de | 445 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(bh->b_data+offset); |
de | 446 | fs/xiafs/namei.c | if (de->d_ino > inode->i_sb->u.xiafs_sb.s_ninodes || |
de | 447 | fs/xiafs/namei.c | de->d_rec_len < 12 || |
de | 448 | fs/xiafs/namei.c | (char *)de+de->d_rec_len > bh->b_data+XIAFS_ZSIZE(inode->i_sb) || |
de | 449 | fs/xiafs/namei.c | de->d_name_len + 8 > de->d_rec_len || |
de | 450 | fs/xiafs/namei.c | de->d_name[de->d_name_len]) { |
de | 455 | fs/xiafs/namei.c | if (de->d_ino) { |
de | 459 | fs/xiafs/namei.c | offset+=de->d_rec_len; |
de | 466 | fs/xiafs/namei.c | static void xiafs_rm_entry(struct xiafs_direct *de, struct xiafs_direct * de_pre) |
de | 468 | fs/xiafs/namei.c | if (de==de_pre) { |
de | 469 | fs/xiafs/namei.c | de->d_ino=0; |
de | 472 | fs/xiafs/namei.c | while (de_pre->d_rec_len+(u_char *)de_pre < (u_char *)de) { |
de | 479 | fs/xiafs/namei.c | if (de_pre->d_rec_len+(u_char *)de_pre > (u_char *)de) { |
de | 483 | fs/xiafs/namei.c | de_pre->d_rec_len+=de->d_rec_len; |
de | 491 | fs/xiafs/namei.c | struct xiafs_direct * de, * de_pre; |
de | 494 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir, name, len, &de, &de_pre); |
de | 499 | fs/xiafs/namei.c | if (!(inode = iget(dir->i_sb, de->d_ino))) |
de | 523 | fs/xiafs/namei.c | xiafs_rm_entry(de, de_pre); |
de | 543 | fs/xiafs/namei.c | struct xiafs_direct * de, * de_pre; |
de | 548 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir, name, len, &de, &de_pre); |
de | 551 | fs/xiafs/namei.c | if (!(inode = iget(dir->i_sb, de->d_ino))) |
de | 556 | fs/xiafs/namei.c | if (de->d_ino != inode->i_ino) { |
de | 571 | fs/xiafs/namei.c | xiafs_rm_entry(de, de_pre); |
de | 588 | fs/xiafs/namei.c | struct xiafs_direct * de; |
de | 594 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir,name,len, &de, NULL); |
de | 621 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
de | 629 | fs/xiafs/namei.c | de->d_ino = inode->i_ino; |
de | 640 | fs/xiafs/namei.c | struct xiafs_direct * de; |
de | 653 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir, name, len, &de, NULL); |
de | 660 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
de | 666 | fs/xiafs/namei.c | de->d_ino = oldinode->i_ino; |
de | 130 | include/linux/msdos_fs.h | struct msdos_dir_entry **de); |