tag | line | file | source code |
de | 54 | fs/dcache.c | #define COPYDATA(de, newde) \ |
de | 55 | fs/dcache.c | memcpy((void *) &newde->dev, (void *) &de->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->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->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 | 23 | fs/ext/dir.c | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de))) |
de | 75 | fs/ext/dir.c | struct ext_dir_entry * de; |
de | 90 | fs/ext/dir.c | de = (struct ext_dir_entry *) (bh->b_data + i); |
de | 91 | fs/ext/dir.c | if (!de->rec_len) |
de | 93 | fs/ext/dir.c | i += de->rec_len; |
de | 96 | fs/ext/dir.c | de = (struct ext_dir_entry *) (offset + bh->b_data); |
de | 98 | fs/ext/dir.c | if (de->rec_len < 8 || de->rec_len % 8 != 0 || |
de | 99 | fs/ext/dir.c | de->rec_len < de->name_len + 8 || |
de | 100 | fs/ext/dir.c | (de->rec_len + (off_t) filp->f_pos - 1) / 1024 > ((off_t) filp->f_pos / 1024)) { |
de | 103 | fs/ext/dir.c | inode->i_dev, inode->i_ino, offset, de->rec_len, de->name_len); |
de | 109 | fs/ext/dir.c | offset += de->rec_len; |
de | 110 | fs/ext/dir.c | filp->f_pos += de->rec_len; |
de | 111 | fs/ext/dir.c | if (de->inode) { |
de | 112 | fs/ext/dir.c | for (i = 0; i < de->name_len; i++) |
de | 113 | fs/ext/dir.c | if ((c = de->name[i]) != 0) |
de | 118 | fs/ext/dir.c | put_fs_long(de->inode,&dirent->d_ino); |
de | 125 | fs/ext/dir.c | de = (struct ext_dir_entry *) ((char *) de |
de | 126 | fs/ext/dir.c | + 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 | 122 | fs/ext/namei.c | dir->i_dev, dir->i_ino, offset, de->rec_len, de->name_len); |
de | 123 | fs/ext/namei.c | de = (struct ext_dir_entry *) (bh->b_data+BLOCK_SIZE); |
de | 129 | fs/ext/namei.c | if (ext_match(namelen,name,de)) { |
de | 130 | fs/ext/namei.c | *res_dir = de; |
de | 132 | fs/ext/namei.c | if (offset + de->rec_len < dir->i_size && |
de | 133 | fs/ext/namei.c | ((char *)de) + de->rec_len < BLOCK_SIZE+bh->b_data) |
de | 135 | fs/ext/namei.c | ((char *) de + de->rec_len); |
de | 140 | fs/ext/namei.c | offset += de->rec_len; |
de | 142 | fs/ext/namei.c | *prev_dir = de; |
de | 143 | fs/ext/namei.c | de = (struct ext_dir_entry *) ((char *) de + de->rec_len); |
de | 153 | fs/ext/namei.c | struct ext_dir_entry * de; |
de | 163 | fs/ext/namei.c | if (!(bh = ext_find_entry(dir,name,len,&de,NULL,NULL))) { |
de | 167 | fs/ext/namei.c | ino = de->inode; |
de | 194 | fs/ext/namei.c | struct ext_dir_entry * de, * de1; |
de | 213 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
de | 215 | fs/ext/namei.c | if ((char *)de >= BLOCK_SIZE+bh->b_data && offset < dir->i_size) { |
de | 224 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
de | 234 | fs/ext/namei.c | de->inode = 0; |
de | 235 | fs/ext/namei.c | de->rec_len = BLOCK_SIZE |
de | 237 | fs/ext/namei.c | de->name_len = 0; |
de | 238 | fs/ext/namei.c | offset += de->rec_len; |
de | 239 | fs/ext/namei.c | dir->i_size += de->rec_len; |
de | 254 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
de | 257 | fs/ext/namei.c | de->inode=0; |
de | 258 | fs/ext/namei.c | de->rec_len = rec_len; |
de | 259 | fs/ext/namei.c | dir->i_size += de->rec_len; |
de | 265 | fs/ext/namei.c | if (de->rec_len < 8 || de->rec_len % 4 != 0 || |
de | 266 | fs/ext/namei.c | de->rec_len < de->name_len + 8 || |
de | 267 | fs/ext/namei.c | (((char *) de) + de->rec_len-1 >= BLOCK_SIZE+bh->b_data)) { |
de | 270 | fs/ext/namei.c | dir->i_dev, dir->i_ino, offset, de->rec_len, de->name_len); |
de | 274 | fs/ext/namei.c | if (!de->inode && de->rec_len >= rec_len) { |
de | 275 | fs/ext/namei.c | if (de->rec_len > rec_len |
de | 276 | fs/ext/namei.c | && de->rec_len - rec_len >= EXT_DIR_MIN_SIZE) { |
de | 281 | fs/ext/namei.c | de1 = (struct ext_dir_entry *) ((char *) de + rec_len); |
de | 283 | fs/ext/namei.c | de1->rec_len = de->rec_len - rec_len; |
de | 285 | fs/ext/namei.c | de->rec_len = rec_len; |
de | 289 | fs/ext/namei.c | de->name_len = namelen; |
de | 291 | fs/ext/namei.c | de->name[i] = name[i]; |
de | 293 | fs/ext/namei.c | *res_dir = de; |
de | 296 | fs/ext/namei.c | offset += de->rec_len; |
de | 297 | fs/ext/namei.c | de = (struct ext_dir_entry *) ((char *) de + de->rec_len); |
de | 308 | fs/ext/namei.c | struct ext_dir_entry * de; |
de | 321 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
de | 329 | fs/ext/namei.c | de->inode = inode->i_ino; |
de | 341 | fs/ext/namei.c | struct ext_dir_entry * de; |
de | 345 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
de | 380 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
de | 388 | fs/ext/namei.c | de->inode = inode->i_ino; |
de | 400 | fs/ext/namei.c | struct ext_dir_entry * de; |
de | 402 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
de | 430 | fs/ext/namei.c | de = (struct ext_dir_entry *) dir_block->b_data; |
de | 431 | fs/ext/namei.c | de->inode=inode->i_ino; |
de | 432 | fs/ext/namei.c | de->rec_len=16; |
de | 433 | fs/ext/namei.c | de->name_len=1; |
de | 434 | fs/ext/namei.c | strcpy(de->name,"."); |
de | 435 | fs/ext/namei.c | de = (struct ext_dir_entry *) ((char *) de + de->rec_len); |
de | 436 | fs/ext/namei.c | de->inode = dir->i_ino; |
de | 437 | fs/ext/namei.c | de->rec_len=16; |
de | 438 | fs/ext/namei.c | de->name_len=2; |
de | 439 | fs/ext/namei.c | strcpy(de->name,".."); |
de | 447 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
de | 454 | fs/ext/namei.c | de->inode = inode->i_ino; |
de | 471 | fs/ext/namei.c | struct ext_dir_entry * de, * de1; |
de | 477 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
de | 478 | fs/ext/namei.c | de1 = (struct ext_dir_entry *) ((char *) de + de->rec_len); |
de | 479 | fs/ext/namei.c | if (de->inode != inode->i_ino || !de1->inode || |
de | 480 | fs/ext/namei.c | strcmp(".",de->name) || strcmp("..",de1->name)) { |
de | 484 | fs/ext/namei.c | offset = de->rec_len + de1->rec_len; |
de | 485 | fs/ext/namei.c | de = (struct ext_dir_entry *) ((char *) de1 + de1->rec_len); |
de | 487 | fs/ext/namei.c | if ((void *) de >= (void *) (bh->b_data+BLOCK_SIZE)) { |
de | 494 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
de | 496 | fs/ext/namei.c | if (de->rec_len < 8 || de->rec_len %4 != 0 || |
de | 497 | fs/ext/namei.c | de->rec_len < de->name_len + 8) { |
de | 500 | fs/ext/namei.c | inode->i_dev, inode->i_ino, offset, de->rec_len, de->name_len); |
de | 504 | fs/ext/namei.c | if (de->inode) { |
de | 508 | fs/ext/namei.c | offset += de->rec_len; |
de | 509 | fs/ext/namei.c | de = (struct ext_dir_entry *) ((char *) de + de->rec_len); |
de | 515 | fs/ext/namei.c | static inline void ext_merge_entries (struct ext_dir_entry * de, |
de | 519 | fs/ext/namei.c | de->rec_len += nde->rec_len; |
de | 521 | fs/ext/namei.c | pde->rec_len += de->rec_len; |
de | 529 | fs/ext/namei.c | struct ext_dir_entry * de, * pde, * nde; |
de | 532 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,&pde,&nde); |
de | 537 | fs/ext/namei.c | if (!(inode = iget(dir->i_sb, de->inode))) |
de | 561 | fs/ext/namei.c | de->inode = 0; |
de | 562 | fs/ext/namei.c | de->name_len = 0; |
de | 563 | fs/ext/namei.c | ext_merge_entries (de, pde, nde); |
de | 583 | fs/ext/namei.c | struct ext_dir_entry * de, * pde, * nde; |
de | 587 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,&pde,&nde); |
de | 590 | fs/ext/namei.c | if (!(inode = iget(dir->i_sb, de->inode))) |
de | 604 | fs/ext/namei.c | de->inode = 0; |
de | 605 | fs/ext/namei.c | de->name_len = 0; |
de | 606 | fs/ext/namei.c | ext_merge_entries (de, pde, nde); |
de | 623 | fs/ext/namei.c | struct ext_dir_entry * de; |
de | 651 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
de | 660 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
de | 668 | fs/ext/namei.c | de->inode = inode->i_ino; |
de | 678 | fs/ext/namei.c | struct ext_dir_entry * de; |
de | 691 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
de | 698 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
de | 704 | fs/ext/namei.c | de->inode = oldinode->i_ino; |
de | 25 | fs/ext2/dir.c | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de))) |
de | 75 | fs/ext2/dir.c | struct ext2_dir_entry * de, struct buffer_head * bh, |
de | 80 | fs/ext2/dir.c | if (de->rec_len < EXT2_DIR_REC_LEN(1)) |
de | 82 | fs/ext2/dir.c | else if (de->rec_len % 4 != 0) |
de | 84 | fs/ext2/dir.c | else if (de->rec_len < EXT2_DIR_REC_LEN(de->name_len)) |
de | 86 | fs/ext2/dir.c | else if (dir && ((char *) de - bh->b_data) + de->rec_len > |
de | 89 | fs/ext2/dir.c | else if (dir && de->inode > dir->i_sb->u.ext2_sb.s_es->s_inodes_count) |
de | 95 | fs/ext2/dir.c | error_msg, offset, (unsigned long) de->inode, de->rec_len, |
de | 96 | fs/ext2/dir.c | de->name_len); |
de | 106 | fs/ext2/dir.c | struct ext2_dir_entry * de; |
de | 152 | fs/ext2/dir.c | de = (struct ext2_dir_entry *) |
de | 160 | fs/ext2/dir.c | if (de->rec_len < EXT2_DIR_REC_LEN(1)) |
de | 162 | fs/ext2/dir.c | i += de->rec_len; |
de | 172 | fs/ext2/dir.c | de = (struct ext2_dir_entry *) (bh->b_data + offset); |
de | 173 | fs/ext2/dir.c | if (!ext2_check_dir_entry ("ext2_readdir", inode, de, |
de | 182 | fs/ext2/dir.c | if (de->inode) { |
de | 184 | fs/ext2/dir.c | + de->name_len + 1); |
de | 201 | fs/ext2/dir.c | i = de->name_len; |
de | 202 | fs/ext2/dir.c | memcpy_tofs (dirent->d_name, de->name, i); |
de | 203 | fs/ext2/dir.c | put_fs_long (de->inode, &dirent->d_ino); |
de | 209 | fs/ext2/dir.c | dcache_add(inode, de->name, de->name_len, |
de | 210 | fs/ext2/dir.c | de->inode); |
de | 216 | fs/ext2/dir.c | offset += de->rec_len; |
de | 217 | fs/ext2/dir.c | filp->f_pos += de->rec_len; |
de | 44 | fs/ext2/namei.c | struct ext2_dir_entry * de) |
de | 46 | fs/ext2/namei.c | if (!de || !de->inode || len > EXT2_NAME_LEN) |
de | 51 | fs/ext2/namei.c | if (!len && de->name_len == 1 && (de->name[0] == '.') && |
de | 52 | fs/ext2/namei.c | (de->name[1] == '\0')) |
de | 54 | fs/ext2/namei.c | if (len != de->name_len) |
de | 56 | fs/ext2/namei.c | return !memcmp(name, de->name, len); |
de | 107 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 126 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
de | 128 | fs/ext2/namei.c | while ((char *) de < dlimit) { |
de | 130 | fs/ext2/namei.c | de, bh, offset)) |
de | 132 | fs/ext2/namei.c | if (de->inode != 0 && ext2_match (namelen, name, de)) { |
de | 137 | fs/ext2/namei.c | *res_dir = de; |
de | 140 | fs/ext2/namei.c | offset += de->rec_len; |
de | 141 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) |
de | 142 | fs/ext2/namei.c | ((char *) de + de->rec_len); |
de | 166 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 189 | fs/ext2/namei.c | if (!(bh = ext2_find_entry (dir, name, len, &de))) { |
de | 195 | fs/ext2/namei.c | ino = de->inode; |
de | 224 | fs/ext2/namei.c | struct ext2_dir_entry * de, * de1; |
de | 254 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
de | 257 | fs/ext2/namei.c | if ((char *)de >= sb->s_blocksize + bh->b_data) { |
de | 271 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
de | 272 | fs/ext2/namei.c | de->inode = 0; |
de | 273 | fs/ext2/namei.c | de->rec_len = sb->s_blocksize; |
de | 280 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
de | 283 | fs/ext2/namei.c | if (!ext2_check_dir_entry ("ext2_add_entry", dir, de, bh, |
de | 289 | fs/ext2/namei.c | if (de->inode != 0 && ext2_match (namelen, name, de)) { |
de | 294 | fs/ext2/namei.c | if ((de->inode == 0 && de->rec_len >= rec_len) || |
de | 295 | fs/ext2/namei.c | (de->rec_len >= EXT2_DIR_REC_LEN(de->name_len) + rec_len)) { |
de | 296 | fs/ext2/namei.c | offset += de->rec_len; |
de | 297 | fs/ext2/namei.c | if (de->inode) { |
de | 298 | fs/ext2/namei.c | de1 = (struct ext2_dir_entry *) ((char *) de + |
de | 299 | fs/ext2/namei.c | EXT2_DIR_REC_LEN(de->name_len)); |
de | 300 | fs/ext2/namei.c | de1->rec_len = de->rec_len - |
de | 301 | fs/ext2/namei.c | EXT2_DIR_REC_LEN(de->name_len); |
de | 302 | fs/ext2/namei.c | de->rec_len = EXT2_DIR_REC_LEN(de->name_len); |
de | 303 | fs/ext2/namei.c | de = de1; |
de | 305 | fs/ext2/namei.c | de->inode = 0; |
de | 306 | fs/ext2/namei.c | de->name_len = namelen; |
de | 307 | fs/ext2/namei.c | memcpy (de->name, name, namelen); |
de | 323 | fs/ext2/namei.c | *res_dir = de; |
de | 327 | fs/ext2/namei.c | offset += de->rec_len; |
de | 328 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) ((char *) de + de->rec_len); |
de | 341 | fs/ext2/namei.c | struct ext2_dir_entry * de, * pde; |
de | 346 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
de | 349 | fs/ext2/namei.c | de, bh, i)) |
de | 351 | fs/ext2/namei.c | if (de == dir) { |
de | 357 | fs/ext2/namei.c | i += de->rec_len; |
de | 358 | fs/ext2/namei.c | pde = de; |
de | 359 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) ((char *) de + de->rec_len); |
de | 369 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 383 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
de | 391 | fs/ext2/namei.c | de->inode = inode->i_ino; |
de | 393 | fs/ext2/namei.c | dcache_add(dir, de->name, de->name_len, de->inode); |
de | 410 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 415 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
de | 447 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
de | 455 | fs/ext2/namei.c | de->inode = inode->i_ino; |
de | 457 | fs/ext2/namei.c | dcache_add(dir, de->name, de->name_len, de->inode); |
de | 473 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 478 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
de | 504 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) dir_block->b_data; |
de | 505 | fs/ext2/namei.c | de->inode = inode->i_ino; |
de | 506 | fs/ext2/namei.c | de->name_len = 1; |
de | 507 | fs/ext2/namei.c | de->rec_len = EXT2_DIR_REC_LEN(de->name_len); |
de | 508 | fs/ext2/namei.c | strcpy (de->name, "."); |
de | 509 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) ((char *) de + de->rec_len); |
de | 510 | fs/ext2/namei.c | de->inode = dir->i_ino; |
de | 511 | fs/ext2/namei.c | de->rec_len = inode->i_sb->s_blocksize - EXT2_DIR_REC_LEN(1); |
de | 512 | fs/ext2/namei.c | de->name_len = 2; |
de | 513 | fs/ext2/namei.c | strcpy (de->name, ".."); |
de | 521 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
de | 529 | fs/ext2/namei.c | de->inode = inode->i_ino; |
de | 531 | fs/ext2/namei.c | dcache_add(dir, de->name, de->name_len, de->inode); |
de | 552 | fs/ext2/namei.c | struct ext2_dir_entry * de, * de1; |
de | 563 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
de | 564 | fs/ext2/namei.c | de1 = (struct ext2_dir_entry *) ((char *) de + de->rec_len); |
de | 565 | fs/ext2/namei.c | if (de->inode != inode->i_ino || !de1->inode || |
de | 566 | fs/ext2/namei.c | strcmp (".", de->name) || strcmp ("..", de1->name)) { |
de | 571 | fs/ext2/namei.c | offset = de->rec_len + de1->rec_len; |
de | 572 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) ((char *) de1 + de1->rec_len); |
de | 574 | fs/ext2/namei.c | if ((void *) de >= (void *) (bh->b_data + sb->s_blocksize)) { |
de | 581 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
de | 583 | fs/ext2/namei.c | if (!ext2_check_dir_entry ("empty_dir", inode, de, bh, |
de | 588 | fs/ext2/namei.c | if (de->inode) { |
de | 592 | fs/ext2/namei.c | offset += de->rec_len; |
de | 593 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) ((char *) de + de->rec_len); |
de | 604 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 610 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
de | 615 | fs/ext2/namei.c | if (!(inode = iget (dir->i_sb, de->inode))) |
de | 619 | fs/ext2/namei.c | if (de->inode != inode->i_ino) { |
de | 639 | fs/ext2/namei.c | else if (de->inode != inode->i_ino) |
de | 652 | fs/ext2/namei.c | retval = ext2_delete_entry (de, bh); |
de | 685 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 692 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
de | 695 | fs/ext2/namei.c | if (!(inode = iget (dir->i_sb, de->inode))) |
de | 702 | fs/ext2/namei.c | if (de->inode != inode->i_ino) { |
de | 719 | fs/ext2/namei.c | retval = ext2_delete_entry (de, bh); |
de | 744 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 790 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
de | 799 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
de | 807 | fs/ext2/namei.c | de->inode = inode->i_ino; |
de | 809 | fs/ext2/namei.c | dcache_add(dir, de->name, de->name_len, de->inode); |
de | 824 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 843 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
de | 850 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
de | 856 | fs/ext2/namei.c | de->inode = oldinode->i_ino; |
de | 858 | fs/ext2/namei.c | dcache_add(dir, de->name, de->name_len, de->inode); |
de | 268 | fs/hpfs/hpfs.h | static inline dnode_secno de_down_pointer (struct hpfs_dirent *de) |
de | 270 | fs/hpfs/hpfs.h | return *(dnode_secno *) ((void *) de + de->length - 4); |
de | 289 | fs/hpfs/hpfs.h | static inline struct hpfs_dirent *de_next_de (struct hpfs_dirent *de) |
de | 291 | fs/hpfs/hpfs.h | return (void *) de + de->length; |
de | 121 | fs/hpfs/hpfs_fs.c | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de))) |
de | 339 | fs/hpfs/hpfs_fs.c | struct hpfs_dirent *de; |
de | 498 | fs/hpfs/hpfs_fs.c | de = map_dirent(s->s_mounted, root_dno, "\001\001", 2, &qbh); |
de | 499 | fs/hpfs/hpfs_fs.c | if (!root_dno || !de) { |
de | 506 | fs/hpfs/hpfs_fs.c | s->s_mounted->i_atime = local_to_gmt(de->read_date); |
de | 507 | fs/hpfs/hpfs_fs.c | s->s_mounted->i_mtime = local_to_gmt(de->write_date); |
de | 508 | fs/hpfs/hpfs_fs.c | s->s_mounted->i_ctime = local_to_gmt(de->creation_date); |
de | 776 | fs/hpfs/hpfs_fs.c | struct hpfs_dirent *de; |
de | 782 | fs/hpfs/hpfs_fs.c | de = dnode_first_de(dnode); |
de | 787 | fs/hpfs/hpfs_fs.c | for (; de < de_end; de = de_next_de(de)) { |
de | 788 | fs/hpfs/hpfs_fs.c | if (de->down) |
de | 789 | fs/hpfs/hpfs_fs.c | count_dnodes(inode, de_down_pointer(de), |
de | 791 | fs/hpfs/hpfs_fs.c | if (de->directory && !de->first) |
de | 793 | fs/hpfs/hpfs_fs.c | if (de->last || de->length == 0) |
de | 1109 | fs/hpfs/hpfs_fs.c | struct hpfs_dirent *de; |
de | 1127 | fs/hpfs/hpfs_fs.c | de = map_dirent(dir, dir->i_hpfs_dno, "\001\001", 2, &qbh); |
de | 1129 | fs/hpfs/hpfs_fs.c | de = map_dirent(dir, |
de | 1133 | fs/hpfs/hpfs_fs.c | de = map_dirent(dir, dir->i_hpfs_dno, name, len, &qbh); |
de | 1139 | fs/hpfs/hpfs_fs.c | if (!de) |
de | 1146 | fs/hpfs/hpfs_fs.c | if (de->directory) |
de | 1147 | fs/hpfs/hpfs_fs.c | ino = dir_ino(de->fnode); |
de | 1149 | fs/hpfs/hpfs_fs.c | ino = file_ino(de->fnode); |
de | 1164 | fs/hpfs/hpfs_fs.c | inode->i_atime = local_to_gmt(de->read_date); |
de | 1165 | fs/hpfs/hpfs_fs.c | inode->i_mtime = local_to_gmt(de->write_date); |
de | 1166 | fs/hpfs/hpfs_fs.c | inode->i_ctime = local_to_gmt(de->creation_date); |
de | 1167 | fs/hpfs/hpfs_fs.c | if (de->read_only) |
de | 1169 | fs/hpfs/hpfs_fs.c | if (!de->directory) { |
de | 1170 | fs/hpfs/hpfs_fs.c | inode->i_size = de->file_size; |
de | 1232 | fs/hpfs/hpfs_fs.c | struct hpfs_dirent *de; |
de | 1246 | fs/hpfs/hpfs_fs.c | de = dnode_first_de(dnode); |
de | 1252 | fs/hpfs/hpfs_fs.c | for ( ; de < de_end; de = de_next_de(de)) { |
de | 1257 | fs/hpfs/hpfs_fs.c | l = len < de->namelen ? len : de->namelen; |
de | 1258 | fs/hpfs/hpfs_fs.c | t = memcasecmp(name, de->name, l); |
de | 1264 | fs/hpfs/hpfs_fs.c | t = len - de->namelen; |
de | 1267 | fs/hpfs/hpfs_fs.c | return de; |
de | 1277 | fs/hpfs/hpfs_fs.c | if (de->down) { |
de | 1278 | fs/hpfs/hpfs_fs.c | dnode_secno sub_dno = de_down_pointer(de); |
de | 1293 | fs/hpfs/hpfs_fs.c | if (de->last || de->length == 0) |
de | 1333 | fs/hpfs/hpfs_fs.c | struct hpfs_dirent *de; |
de | 1360 | fs/hpfs/hpfs_fs.c | de = map_pos_dirent(inode, &filp->f_pos, &qbh); |
de | 1361 | fs/hpfs/hpfs_fs.c | if (!de) { |
de | 1366 | fs/hpfs/hpfs_fs.c | namelen = de->namelen; |
de | 1367 | fs/hpfs/hpfs_fs.c | if (de->directory) |
de | 1368 | fs/hpfs/hpfs_fs.c | ino = dir_ino(de->fnode); |
de | 1370 | fs/hpfs/hpfs_fs.c | ino = file_ino(de->fnode); |
de | 1371 | fs/hpfs/hpfs_fs.c | write_one_dirent(dirent, de->name, namelen, ino, lc); |
de | 1416 | fs/hpfs/hpfs_fs.c | struct hpfs_dirent *de; |
de | 1439 | fs/hpfs/hpfs_fs.c | de = map_nth_dirent(inode->i_dev, dno, r, qbh); |
de | 1445 | fs/hpfs/hpfs_fs.c | if (!de) { |
de | 1456 | fs/hpfs/hpfs_fs.c | if (de->down) |
de | 1465 | fs/hpfs/hpfs_fs.c | if (de->first || de->last) { |
de | 1470 | fs/hpfs/hpfs_fs.c | return de; |
de | 1479 | fs/hpfs/hpfs_fs.c | struct hpfs_dirent *de; |
de | 1515 | fs/hpfs/hpfs_fs.c | de = map_nth_dirent(inode->i_dev, dno, r, &qbh); |
de | 1516 | fs/hpfs/hpfs_fs.c | if (!de || !de->down) |
de | 1522 | fs/hpfs/hpfs_fs.c | dno = de_down_pointer(de); |
de | 1543 | fs/hpfs/hpfs_fs.c | struct hpfs_dirent *de, *de_end; |
de | 1546 | fs/hpfs/hpfs_fs.c | de = dnode_first_de(dnode); |
de | 1549 | fs/hpfs/hpfs_fs.c | for (i = 1; de < de_end; i++, de = de_next_de(de)) { |
de | 1551 | fs/hpfs/hpfs_fs.c | return de; |
de | 1552 | fs/hpfs/hpfs_fs.c | if (de->last || de->length == 0) |
de | 29 | fs/isofs/dir.c | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de))) |
de | 81 | fs/isofs/dir.c | struct iso_directory_record * de; |
de | 100 | fs/isofs/dir.c | de = (struct iso_directory_record *) (bh->b_data + offset); |
de | 107 | fs/isofs/dir.c | if (*((unsigned char *) de) == 0) { |
de | 126 | fs/isofs/dir.c | offset += *((unsigned char *) de); |
de | 127 | fs/isofs/dir.c | filp->f_pos += *((unsigned char *) de); |
de | 132 | fs/isofs/dir.c | cpnt = kmalloc(*((unsigned char *) de),GFP_KERNEL); |
de | 135 | fs/isofs/dir.c | de = (struct iso_directory_record *) ((char *)cpnt); |
de | 152 | fs/isofs/dir.c | if (de->name_len[0] == 1 && de->name[0] == 0) { |
de | 160 | fs/isofs/dir.c | else if (de->name_len[0] == 1 && de->name[0] == 1) { |
de | 174 | fs/isofs/dir.c | find_rock_ridge_relocation(de, inode)); |
de | 190 | fs/isofs/dir.c | if (de->flags[-high_sierra] & 5) { |
de | 198 | fs/isofs/dir.c | dlen = de->name_len[0]; |
de | 199 | fs/isofs/dir.c | dpnt = de->name; |
de | 201 | fs/isofs/dir.c | rrflag = get_rock_ridge_filename(de, &dpnt, &dlen, inode); |
de | 220 | fs/isofs/dir.c | if (c == '.' && i == dlen-3 && de->name[i+1] == ';' && de->name[i+2] == '1') |
de | 222 | fs/isofs/dir.c | if (c == ';' && i == dlen-2 && de->name[i+1] == '1') |
de | 637 | fs/isofs/inode.c | struct iso_directory_record * de; |
de | 644 | fs/isofs/inode.c | de = (struct iso_directory_record *) (bh->b_data + offset); |
de | 645 | fs/isofs/inode.c | if (*((unsigned char *) de) == 0) |
de | 651 | fs/isofs/inode.c | offset += *((unsigned char *) de); |
de | 661 | fs/isofs/inode.c | if (de->name_len[0] == 1 && de->name[0] == 1) |
de | 663 | fs/isofs/inode.c | parent_dir = find_rock_ridge_relocation(de, parent); |
de | 664 | fs/isofs/inode.c | directory_size = isonum_733 (de->size); |
de | 683 | fs/isofs/inode.c | de = (struct iso_directory_record *) (bh->b_data + offset); |
de | 690 | fs/isofs/inode.c | if (*((unsigned char *) de) == 0) |
de | 710 | fs/isofs/inode.c | offset += *((unsigned char *) de); |
de | 716 | fs/isofs/inode.c | cpnt = kmalloc(*((unsigned char *) de),GFP_KERNEL); |
de | 719 | fs/isofs/inode.c | de = (struct iso_directory_record *) ((char *)cpnt); |
de | 732 | fs/isofs/inode.c | if (find_rock_ridge_relocation(de, parent) == extent){ |
de | 49 | fs/isofs/namei.c | if (len <= 2) printk("Match: %d %d %s %d %d \n",len,dlen,compare,de->name[0], dlen); |
de | 77 | fs/isofs/namei.c | struct iso_directory_record * de; |
de | 93 | fs/isofs/namei.c | de = (struct iso_directory_record *) (bh->b_data + offset); |
de | 100 | fs/isofs/namei.c | if (*((unsigned char *) de) == 0) { |
de | 112 | fs/isofs/namei.c | offset += *((unsigned char *) de); |
de | 113 | fs/isofs/namei.c | f_pos += *((unsigned char *) de); |
de | 120 | fs/isofs/namei.c | cpnt = kmalloc(*((unsigned char *) de),GFP_KERNEL); |
de | 124 | fs/isofs/namei.c | de = (struct iso_directory_record *) cpnt; |
de | 137 | fs/isofs/namei.c | if (de->name[0]==0 && de->name_len[0]==1) { |
de | 144 | fs/isofs/namei.c | if (de->name[0]==1 && de->name_len[0]==1) { |
de | 157 | fs/isofs/namei.c | dlen = de->name_len[0]; |
de | 158 | fs/isofs/namei.c | dpnt = de->name; |
de | 160 | fs/isofs/namei.c | rrflag = get_rock_ridge_filename(de, &dpnt, &dlen, dir); |
de | 173 | fs/isofs/namei.c | de->name[i] = c; |
de | 193 | fs/isofs/namei.c | find_rock_ridge_relocation(de,dir)); |
de | 100 | fs/isofs/rock.c | int find_rock_ridge_relocation(struct iso_directory_record * de, |
de | 112 | fs/isofs/rock.c | if (de->name[0]==1 && de->name_len[0]==1) flag = 1; |
de | 114 | fs/isofs/rock.c | retval = isonum_733 (de->extent); |
de | 118 | fs/isofs/rock.c | SETUP_ROCK_RIDGE(de, chr, len); |
de | 173 | fs/isofs/rock.c | int get_rock_ridge_filename(struct iso_directory_record * de, |
de | 184 | fs/isofs/rock.c | SETUP_ROCK_RIDGE(de, chr, len); |
de | 257 | fs/isofs/rock.c | int parse_rock_ridge_inode(struct iso_directory_record * de, |
de | 265 | fs/isofs/rock.c | SETUP_ROCK_RIDGE(de, chr, len); |
de | 20 | fs/minix/dir.c | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de))) |
de | 71 | fs/minix/dir.c | struct minix_dir_entry * de; |
de | 88 | fs/minix/dir.c | de = (struct minix_dir_entry *) (offset + bh->b_data); |
de | 92 | fs/minix/dir.c | if (de->inode) { |
de | 95 | fs/minix/dir.c | if ((c = de->name[i]) != 0) |
de | 100 | fs/minix/dir.c | put_fs_long(de->inode,&dirent->d_ino); |
de | 48 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 50 | fs/minix/namei.c | de = (struct minix_dir_entry *) (bh->b_data + *offset); |
de | 52 | fs/minix/namei.c | if (!de->inode || len > info->s_namelen) |
de | 55 | fs/minix/namei.c | if (!len && (de->name[0]=='.') && (de->name[1]=='\0')) |
de | 57 | fs/minix/namei.c | return namecompare(len,info->s_namelen,name,de->name); |
de | 115 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 125 | fs/minix/namei.c | if (!(bh = minix_find_entry(dir,name,len,&de))) { |
de | 129 | fs/minix/namei.c | ino = de->inode; |
de | 157 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 182 | fs/minix/namei.c | de = (struct minix_dir_entry *) (bh->b_data + offset); |
de | 185 | fs/minix/namei.c | de->inode = 0; |
de | 189 | fs/minix/namei.c | if (de->inode) { |
de | 190 | fs/minix/namei.c | if (namecompare(namelen, info->s_namelen, name, de->name)) { |
de | 198 | fs/minix/namei.c | de->name[i] = (i < namelen) ? name[i] : 0; |
de | 201 | fs/minix/namei.c | *res_dir = de; |
de | 221 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 234 | fs/minix/namei.c | error = minix_add_entry(dir,name,len, &bh ,&de); |
de | 242 | fs/minix/namei.c | de->inode = inode->i_ino; |
de | 255 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 259 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
de | 291 | fs/minix/namei.c | error = minix_add_entry(dir, name, len, &bh, &de); |
de | 299 | fs/minix/namei.c | de->inode = inode->i_ino; |
de | 312 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 320 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
de | 345 | fs/minix/namei.c | de = (struct minix_dir_entry *) dir_block->b_data; |
de | 346 | fs/minix/namei.c | de->inode=inode->i_ino; |
de | 347 | fs/minix/namei.c | strcpy(de->name,"."); |
de | 348 | fs/minix/namei.c | de = (struct minix_dir_entry *) (dir_block->b_data + info->s_dirsize); |
de | 349 | fs/minix/namei.c | de->inode = dir->i_ino; |
de | 350 | fs/minix/namei.c | strcpy(de->name,".."); |
de | 358 | fs/minix/namei.c | error = minix_add_entry(dir, name, len, &bh, &de); |
de | 365 | fs/minix/namei.c | de->inode = inode->i_ino; |
de | 382 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 398 | fs/minix/namei.c | de = (struct minix_dir_entry *) bh->b_data; |
de | 399 | fs/minix/namei.c | if (!de->inode || strcmp(de->name,".")) |
de | 401 | fs/minix/namei.c | de = (struct minix_dir_entry *) (bh->b_data + info->s_dirsize); |
de | 402 | fs/minix/namei.c | if (!de->inode || strcmp(de->name,"..")) |
de | 412 | fs/minix/namei.c | de = (struct minix_dir_entry *) (bh->b_data + offset); |
de | 414 | fs/minix/namei.c | if (de->inode) { |
de | 438 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 441 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
de | 446 | fs/minix/namei.c | if (!(inode = iget(dir->i_sb, de->inode))) |
de | 464 | fs/minix/namei.c | if (de->inode != inode->i_ino) { |
de | 474 | fs/minix/namei.c | de->inode = 0; |
de | 495 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 500 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
de | 503 | fs/minix/namei.c | if (!(inode = iget(dir->i_sb, de->inode))) |
de | 508 | fs/minix/namei.c | if (de->inode != inode->i_ino) { |
de | 519 | fs/minix/namei.c | if (de->inode != inode->i_ino) { |
de | 528 | fs/minix/namei.c | de->inode = 0; |
de | 546 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 574 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
de | 583 | fs/minix/namei.c | i = minix_add_entry(dir, name, len, &bh, &de); |
de | 591 | fs/minix/namei.c | de->inode = inode->i_ino; |
de | 602 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 615 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
de | 622 | fs/minix/namei.c | error = minix_add_entry(dir, name, len, &bh, &de); |
de | 628 | fs/minix/namei.c | de->inode = oldinode->i_ino; |
de | 23 | fs/msdos/dir.c | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de))) |
de | 75 | fs/msdos/dir.c | struct msdos_dir_entry *de; |
de | 93 | fs/msdos/dir.c | while ((ino = msdos_get_entry(inode,&filp->f_pos,&bh,&de)) > -1) { |
de | 94 | fs/msdos/dir.c | if (!IS_FREE(de->name) && !(de->attr & ATTR_VOLUME)) { |
de | 98 | fs/msdos/dir.c | if (!(c = de->name[i])) break; |
de | 108 | fs/msdos/dir.c | if (!(c = de->ext[i2])) break; |
de | 116 | fs/msdos/dir.c | if (!strcmp(de->name,MSDOS_DOT)) |
de | 118 | fs/msdos/dir.c | else if (!strcmp(de->name,MSDOS_DOTDOT)) |
de | 262 | fs/msdos/misc.c | struct msdos_dir_entry **de) |
de | 284 | fs/msdos/misc.c | *de = (struct msdos_dir_entry *) ((*bh)->b_data+(offset & |
de | 102 | fs/msdos/namei.c | struct buffer_head **bh,struct msdos_dir_entry **de,int *ino) |
de | 109 | fs/msdos/namei.c | return msdos_scan(dir,msdos_name,bh,de,ino); |
de | 118 | fs/msdos/namei.c | struct msdos_dir_entry *de; |
de | 143 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) { |
de | 185 | fs/msdos/namei.c | struct msdos_dir_entry *de; |
de | 188 | fs/msdos/namei.c | if ((res = msdos_scan(dir,NULL,&bh,&de,&ino)) < 0) { |
de | 192 | fs/msdos/namei.c | if ((res = msdos_scan(dir,NULL,&bh,&de,&ino)) < 0) return res; |
de | 199 | fs/msdos/namei.c | memcpy(de->name,name,MSDOS_NAME); |
de | 200 | fs/msdos/namei.c | memset(de->unused, 0, sizeof(de->unused)); |
de | 201 | fs/msdos/namei.c | de->attr = is_dir ? ATTR_DIR : ATTR_ARCH; |
de | 202 | fs/msdos/namei.c | de->start = 0; |
de | 203 | fs/msdos/namei.c | date_unix2dos(dir->i_mtime,&de->time,&de->date); |
de | 204 | fs/msdos/namei.c | de->size = 0; |
de | 222 | fs/msdos/namei.c | struct msdos_dir_entry *de; |
de | 233 | fs/msdos/namei.c | if (msdos_scan(dir,msdos_name,&bh,&de,&ino) >= 0) { |
de | 270 | fs/msdos/namei.c | struct msdos_dir_entry *de; |
de | 281 | fs/msdos/namei.c | if (msdos_scan(dir,msdos_name,&bh,&de,&ino) >= 0) { |
de | 329 | fs/msdos/namei.c | struct msdos_dir_entry *de; |
de | 336 | fs/msdos/namei.c | while (msdos_get_entry(dir,&pos,&bh,&de) > -1) |
de | 337 | fs/msdos/namei.c | if (!IS_FREE(de->name) && strncmp(de->name,MSDOS_DOT, |
de | 338 | fs/msdos/namei.c | MSDOS_NAME) && strncmp(de->name,MSDOS_DOTDOT, |
de | 355 | fs/msdos/namei.c | struct msdos_dir_entry *de; |
de | 363 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) goto rmdir_done; |
de | 377 | fs/msdos/namei.c | de->name[0] = DELETED_FLAG; |
de | 397 | fs/msdos/namei.c | struct msdos_dir_entry *de; |
de | 402 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) |
de | 416 | fs/msdos/namei.c | de->name[0] = DELETED_FLAG; |
de | 25 | fs/nfs/dir.c | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de))) |
de | 124 | fs/pipe.c | static int pipe_readdir(struct inode * inode, struct file * file, struct dirent * de, int count) |
de | 70 | fs/proc/base.c | int proc_match(int len,const char * name,struct proc_dir_entry * de) |
de | 72 | fs/proc/base.c | if (!de || !de->low_ino) |
de | 75 | fs/proc/base.c | if (!len && (de->name[0]=='.') && (de->name[1]=='\0')) |
de | 77 | fs/proc/base.c | if (de->namelen != len) |
de | 79 | fs/proc/base.c | return !memcmp(name, de->name, len); |
de | 126 | fs/proc/base.c | struct proc_dir_entry * de; |
de | 140 | fs/proc/base.c | de = base_dir + filp->f_pos; |
de | 142 | fs/proc/base.c | i = de->namelen; |
de | 143 | fs/proc/base.c | ino = de->low_ino; |
de | 151 | fs/proc/base.c | put_fs_byte(de->name[i], i+dirent->d_name); |
de | 187 | fs/proc/net.c | struct proc_dir_entry *de; |
de | 196 | fs/proc/net.c | for (de = net_dir ; de->name ; de++) { |
de | 197 | fs/proc/net.c | if (!proc_match(len, name, de)) |
de | 199 | fs/proc/net.c | *result = iget(dir->i_sb, de->low_ino); |
de | 212 | fs/proc/net.c | struct proc_dir_entry * de; |
de | 220 | fs/proc/net.c | de = net_dir + filp->f_pos; |
de | 222 | fs/proc/net.c | i = de->namelen; |
de | 223 | fs/proc/net.c | ino = de->low_ino; |
de | 229 | fs/proc/net.c | put_fs_byte(de->name[i], i+dirent->d_name); |
de | 156 | fs/proc/root.c | struct proc_dir_entry * de = root_dir + nr; |
de | 159 | fs/proc/root.c | i = de->namelen; |
de | 160 | fs/proc/root.c | put_fs_long(de->low_ino, &dirent->d_ino); |
de | 165 | fs/proc/root.c | put_fs_byte(de->name[i], i+dirent->d_name); |
de | 27 | fs/sysv/dir.c | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de))) |
de | 79 | fs/sysv/dir.c | struct sysv_dir_entry * de; |
de | 94 | fs/sysv/dir.c | de = (struct sysv_dir_entry *) (offset + bh_data); |
de | 97 | fs/sysv/dir.c | if (de->inode) { |
de | 103 | fs/sysv/dir.c | memcpy(&sde, de, sizeof(struct sysv_dir_entry)); |
de | 46 | fs/sysv/namei.c | static int sysv_match(int len, const char * name, struct sysv_dir_entry * de) |
de | 48 | fs/sysv/namei.c | if (!de->inode || len > SYSV_NAMELEN) |
de | 51 | fs/sysv/namei.c | if (!len && (de->name[0]=='.') && (de->name[1]=='\0')) |
de | 53 | fs/sysv/namei.c | return namecompare(len,SYSV_NAMELEN,name,de->name); |
de | 111 | fs/sysv/namei.c | struct sysv_dir_entry * de; |
de | 121 | fs/sysv/namei.c | if (!(bh = sysv_find_entry(dir,name,len,&de))) { |
de | 125 | fs/sysv/namei.c | ino = de->inode; |
de | 154 | fs/sysv/namei.c | struct sysv_dir_entry * de; |
de | 176 | fs/sysv/namei.c | de = (struct sysv_dir_entry *) (bh->b_data + offset); |
de | 180 | fs/sysv/namei.c | de->inode = 0; |
de | 184 | fs/sysv/namei.c | if (de->inode) { |
de | 185 | fs/sysv/namei.c | if (namecompare(namelen, SYSV_NAMELEN, name, de->name)) { |
de | 193 | fs/sysv/namei.c | de->name[i] = (i < namelen) ? name[i] : 0; |
de | 195 | fs/sysv/namei.c | *res_dir = de; |
de | 214 | fs/sysv/namei.c | struct sysv_dir_entry * de; |
de | 227 | fs/sysv/namei.c | error = sysv_add_entry(dir,name,len, &bh ,&de); |
de | 235 | fs/sysv/namei.c | de->inode = inode->i_ino; |
de | 248 | fs/sysv/namei.c | struct sysv_dir_entry * de; |
de | 252 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
de | 284 | fs/sysv/namei.c | error = sysv_add_entry(dir, name, len, &bh, &de); |
de | 292 | fs/sysv/namei.c | de->inode = inode->i_ino; |
de | 305 | fs/sysv/namei.c | struct sysv_dir_entry * de; |
de | 311 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
de | 336 | fs/sysv/namei.c | de = (struct sysv_dir_entry *) (dir_block->b_data + 0*SYSV_DIRSIZE); |
de | 337 | fs/sysv/namei.c | de->inode = inode->i_ino; |
de | 338 | fs/sysv/namei.c | strcpy(de->name,"."); /* rest of de->name is zero, see sysv_new_block */ |
de | 339 | fs/sysv/namei.c | de = (struct sysv_dir_entry *) (dir_block->b_data + 1*SYSV_DIRSIZE); |
de | 340 | fs/sysv/namei.c | de->inode = dir->i_ino; |
de | 341 | fs/sysv/namei.c | strcpy(de->name,".."); /* rest of de->name is zero, see sysv_new_block */ |
de | 349 | fs/sysv/namei.c | error = sysv_add_entry(dir, name, len, &bh, &de); |
de | 356 | fs/sysv/namei.c | de->inode = inode->i_ino; |
de | 374 | fs/sysv/namei.c | struct sysv_dir_entry * de; |
de | 388 | fs/sysv/namei.c | de = (struct sysv_dir_entry *) (bh->b_data + 0*SYSV_DIRSIZE); |
de | 389 | fs/sysv/namei.c | if (!de->inode || strcmp(de->name,".")) |
de | 391 | fs/sysv/namei.c | de = (struct sysv_dir_entry *) (bh->b_data + 1*SYSV_DIRSIZE); |
de | 392 | fs/sysv/namei.c | if (!de->inode || strcmp(de->name,"..")) |
de | 404 | fs/sysv/namei.c | de = (struct sysv_dir_entry *) (bh->b_data + offset); |
de | 407 | fs/sysv/namei.c | if (de->inode) { |
de | 430 | fs/sysv/namei.c | struct sysv_dir_entry * de; |
de | 433 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
de | 438 | fs/sysv/namei.c | if (!(inode = iget(dir->i_sb, de->inode))) |
de | 456 | fs/sysv/namei.c | if (de->inode != inode->i_ino) { |
de | 466 | fs/sysv/namei.c | de->inode = 0; |
de | 486 | fs/sysv/namei.c | struct sysv_dir_entry * de; |
de | 491 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
de | 494 | fs/sysv/namei.c | if (!(inode = iget(dir->i_sb, de->inode))) |
de | 499 | fs/sysv/namei.c | if (de->inode != inode->i_ino) { |
de | 510 | fs/sysv/namei.c | if (de->inode != inode->i_ino) { |
de | 519 | fs/sysv/namei.c | de->inode = 0; |
de | 536 | fs/sysv/namei.c | struct sysv_dir_entry * de; |
de | 569 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
de | 578 | fs/sysv/namei.c | i = sysv_add_entry(dir, name, len, &bh, &de); |
de | 586 | fs/sysv/namei.c | de->inode = inode->i_ino; |
de | 597 | fs/sysv/namei.c | struct sysv_dir_entry * de; |
de | 610 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
de | 617 | fs/sysv/namei.c | error = sysv_add_entry(dir, name, len, &bh, &de); |
de | 623 | fs/sysv/namei.c | de->inode = oldinode->i_ino; |
de | 39 | fs/umsdos/dir.c | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de))) |
de | 26 | fs/xiafs/dir.c | #define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de))) |
de | 77 | fs/xiafs/dir.c | struct xiafs_direct * de; |
de | 92 | fs/xiafs/dir.c | de = (struct xiafs_direct *) (bh->b_data + i); |
de | 93 | fs/xiafs/dir.c | if (!de->d_rec_len) |
de | 95 | fs/xiafs/dir.c | i += de->d_rec_len; |
de | 98 | fs/xiafs/dir.c | de = (struct xiafs_direct *) (offset + bh->b_data); |
de | 101 | fs/xiafs/dir.c | if (de->d_ino > inode->i_sb->u.xiafs_sb.s_ninodes || |
de | 102 | fs/xiafs/dir.c | de->d_rec_len < 12 || |
de | 103 | fs/xiafs/dir.c | (char *)de+de->d_rec_len > XIAFS_ZSIZE(inode->i_sb)+bh->b_data || |
de | 104 | fs/xiafs/dir.c | de->d_name_len < 1 || de->d_name_len + 8 > de->d_rec_len || |
de | 105 | fs/xiafs/dir.c | de->d_name_len > _XIAFS_NAME_LEN || |
de | 106 | fs/xiafs/dir.c | de->d_name[de->d_name_len] ) { |
de | 111 | fs/xiafs/dir.c | offset += de->d_rec_len; |
de | 112 | fs/xiafs/dir.c | filp->f_pos += de->d_rec_len; |
de | 113 | fs/xiafs/dir.c | if (de->d_ino) { |
de | 114 | fs/xiafs/dir.c | for (i = 0; i < de->d_name_len ; i++) |
de | 115 | fs/xiafs/dir.c | put_fs_byte(de->d_name[i],i+dirent->d_name); |
de | 117 | fs/xiafs/dir.c | put_fs_long(de->d_ino,&dirent->d_ino); |
de | 126 | fs/xiafs/dir.c | de = (struct xiafs_direct *) (offset + bh->b_data); |
de | 163 | fs/xiafs/namei.c | struct xiafs_direct * de, * de_pre; |
de | 178 | fs/xiafs/namei.c | de_pre=de=(struct xiafs_direct *)bh->b_data; |
de | 180 | fs/xiafs/namei.c | if (de->d_rec_len != 12 || !de->d_ino || de->d_name_len != 1 || |
de | 181 | fs/xiafs/namei.c | strcmp(de->d_name, ".")) { |
de | 187 | fs/xiafs/namei.c | de_pre=de=(struct xiafs_direct *)(bh->b_data+12); |
de | 192 | fs/xiafs/namei.c | de->d_ino=0; |
de | 193 | fs/xiafs/namei.c | de->d_name_len=0; |
de | 194 | fs/xiafs/namei.c | de->d_name[0]=0; |
de | 195 | fs/xiafs/namei.c | de->d_rec_len=XIAFS_ZSIZE(dir->i_sb); |
de | 199 | fs/xiafs/namei.c | if (de->d_ino > dir->i_sb->u.xiafs_sb.s_ninodes || |
de | 200 | fs/xiafs/namei.c | de->d_rec_len < 12 || |
de | 201 | fs/xiafs/namei.c | (char *)de+de->d_rec_len > bh->b_data+XIAFS_ZSIZE(dir->i_sb) || |
de | 202 | fs/xiafs/namei.c | de->d_name_len + 8 > de->d_rec_len || |
de | 203 | fs/xiafs/namei.c | de->d_name[de->d_name_len]) { |
de | 208 | fs/xiafs/namei.c | if (de->d_ino && |
de | 209 | fs/xiafs/namei.c | RNDUP4(de->d_name_len)+RNDUP4(namelen)+16<=de->d_rec_len) { |
de | 210 | fs/xiafs/namei.c | i=RNDUP4(de->d_name_len)+8; |
de | 211 | fs/xiafs/namei.c | de_pre=de; |
de | 212 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(i+(u_char *)de_pre); |
de | 213 | fs/xiafs/namei.c | de->d_ino=0; |
de | 214 | fs/xiafs/namei.c | de->d_rec_len=de_pre->d_rec_len-i; |
de | 218 | fs/xiafs/namei.c | if (!de->d_ino && RNDUP4(namelen)+8 <= de->d_rec_len) { |
de | 225 | fs/xiafs/namei.c | memcpy(de->d_name, name, namelen); |
de | 226 | fs/xiafs/namei.c | de->d_name[namelen]=0; |
de | 227 | fs/xiafs/namei.c | de->d_name_len=namelen; |
de | 229 | fs/xiafs/namei.c | *res_dir = de; |
de | 234 | fs/xiafs/namei.c | offset+=de->d_rec_len; |
de | 235 | fs/xiafs/namei.c | de_pre=de; |
de | 236 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(bh->b_data+offset); |
de | 253 | fs/xiafs/namei.c | struct xiafs_direct * de; |
de | 266 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
de | 274 | fs/xiafs/namei.c | de->d_ino = inode->i_ino; |
de | 286 | fs/xiafs/namei.c | struct xiafs_direct * de; |
de | 290 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir,name,len,&de, NULL); |
de | 323 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
de | 331 | fs/xiafs/namei.c | de->d_ino = inode->i_ino; |
de | 343 | fs/xiafs/namei.c | struct xiafs_direct * de; |
de | 345 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir,name,len,&de, NULL); |
de | 372 | fs/xiafs/namei.c | de = (struct xiafs_direct *) dir_block->b_data; |
de | 373 | fs/xiafs/namei.c | de->d_ino=inode->i_ino; |
de | 374 | fs/xiafs/namei.c | strcpy(de->d_name,"."); |
de | 375 | fs/xiafs/namei.c | de->d_name_len=1; |
de | 376 | fs/xiafs/namei.c | de->d_rec_len=12; |
de | 377 | fs/xiafs/namei.c | de =(struct xiafs_direct *)(12 + dir_block->b_data); |
de | 378 | fs/xiafs/namei.c | de->d_ino = dir->i_ino; |
de | 379 | fs/xiafs/namei.c | strcpy(de->d_name,".."); |
de | 380 | fs/xiafs/namei.c | de->d_name_len=2; |
de | 381 | fs/xiafs/namei.c | de->d_rec_len=XIAFS_ZSIZE(dir->i_sb)-12; |
de | 389 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
de | 396 | fs/xiafs/namei.c | de->d_ino = inode->i_ino; |
de | 413 | fs/xiafs/namei.c | struct xiafs_direct * de; |
de | 428 | fs/xiafs/namei.c | de=(struct xiafs_direct *)bh->b_data; |
de | 429 | fs/xiafs/namei.c | if (de->d_ino != inode->i_ino || strcmp(".", de->d_name) || |
de | 430 | fs/xiafs/namei.c | de->d_rec_len != 12 ) { |
de | 435 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(12 + bh->b_data); |
de | 436 | fs/xiafs/namei.c | if (!de->d_ino || strcmp("..", de->d_name)) { |
de | 441 | fs/xiafs/namei.c | offset=de->d_rec_len+12; |
de | 448 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(bh->b_data+offset); |
de | 449 | fs/xiafs/namei.c | if (de->d_ino > inode->i_sb->u.xiafs_sb.s_ninodes || |
de | 450 | fs/xiafs/namei.c | de->d_rec_len < 12 || |
de | 451 | fs/xiafs/namei.c | (char *)de+de->d_rec_len > bh->b_data+XIAFS_ZSIZE(inode->i_sb) || |
de | 452 | fs/xiafs/namei.c | de->d_name_len + 8 > de->d_rec_len || |
de | 453 | fs/xiafs/namei.c | de->d_name[de->d_name_len]) { |
de | 458 | fs/xiafs/namei.c | if (de->d_ino) { |
de | 462 | fs/xiafs/namei.c | offset+=de->d_rec_len; |
de | 469 | fs/xiafs/namei.c | static void xiafs_rm_entry(struct xiafs_direct *de, struct xiafs_direct * de_pre) |
de | 471 | fs/xiafs/namei.c | if (de==de_pre) { |
de | 472 | fs/xiafs/namei.c | de->d_ino=0; |
de | 475 | fs/xiafs/namei.c | while (de_pre->d_rec_len+(u_char *)de_pre < (u_char *)de) { |
de | 482 | fs/xiafs/namei.c | if (de_pre->d_rec_len+(u_char *)de_pre > (u_char *)de) { |
de | 486 | fs/xiafs/namei.c | de_pre->d_rec_len+=de->d_rec_len; |
de | 494 | fs/xiafs/namei.c | struct xiafs_direct * de, * de_pre; |
de | 497 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir, name, len, &de, &de_pre); |
de | 502 | fs/xiafs/namei.c | if (!(inode = iget(dir->i_sb, de->d_ino))) |
de | 526 | fs/xiafs/namei.c | xiafs_rm_entry(de, de_pre); |
de | 546 | fs/xiafs/namei.c | struct xiafs_direct * de, * de_pre; |
de | 551 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir, name, len, &de, &de_pre); |
de | 554 | fs/xiafs/namei.c | if (!(inode = iget(dir->i_sb, de->d_ino))) |
de | 559 | fs/xiafs/namei.c | if (de->d_ino != inode->i_ino) { |
de | 574 | fs/xiafs/namei.c | xiafs_rm_entry(de, de_pre); |
de | 591 | fs/xiafs/namei.c | struct xiafs_direct * de; |
de | 597 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir,name,len, &de, NULL); |
de | 624 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
de | 632 | fs/xiafs/namei.c | de->d_ino = inode->i_ino; |
de | 643 | fs/xiafs/namei.c | struct xiafs_direct * de; |
de | 656 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir, name, len, &de, NULL); |
de | 663 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
de | 669 | fs/xiafs/namei.c | de->d_ino = oldinode->i_ino; |
de | 125 | include/linux/msdos_fs.h | struct msdos_dir_entry **de); |