tag | line | file | source code |
de | 70 | fs/ext/dir.c | struct ext_dir_entry * de; |
de | 83 | fs/ext/dir.c | de = (struct ext_dir_entry *) (offset + bh->b_data); |
de | 85 | fs/ext/dir.c | if (de->rec_len < 8 || de->rec_len % 8 != 0 || |
de | 86 | fs/ext/dir.c | de->rec_len < de->name_len + 8 || |
de | 87 | fs/ext/dir.c | (de->rec_len + filp->f_pos - 1) / 1024 > (filp->f_pos / 1024)) { |
de | 90 | fs/ext/dir.c | inode->i_dev, inode->i_ino, offset, de->rec_len, de->name_len); |
de | 96 | fs/ext/dir.c | offset += de->rec_len; |
de | 97 | fs/ext/dir.c | filp->f_pos += de->rec_len; |
de | 98 | fs/ext/dir.c | if (de->inode) { |
de | 99 | fs/ext/dir.c | for (i = 0; i < de->name_len; i++) |
de | 100 | fs/ext/dir.c | if ((c = de->name[i]) != 0) |
de | 105 | fs/ext/dir.c | put_fs_long(de->inode,&dirent->d_ino); |
de | 112 | fs/ext/dir.c | de = (struct ext_dir_entry *) ((char *) de |
de | 113 | 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 | 60 | fs/ext/namei.c | if (!de || !de->inode || len > EXT_NAME_LEN) |
de | 63 | fs/ext/namei.c | if (!len && (de->name[0]=='.') && (de->name[1]=='\0')) |
de | 65 | fs/ext/namei.c | if (len < EXT_NAME_LEN && len != de->name_len) |
de | 71 | fs/ext/namei.c | :"0" (0),"S" ((long) name),"D" ((long) de->name),"c" (len) |
de | 93 | fs/ext/namei.c | struct ext_dir_entry * de; |
de | 113 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
de | 115 | fs/ext/namei.c | if ((char *)de >= BLOCK_SIZE+bh->b_data) { |
de | 121 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
de | 125 | fs/ext/namei.c | if (de->rec_len < 8 || de->rec_len % 8 != 0 || |
de | 126 | fs/ext/namei.c | de->rec_len < de->name_len + 8 || |
de | 127 | fs/ext/namei.c | (((char *) de) + de->rec_len-1 >= BLOCK_SIZE+bh->b_data)) { |
de | 130 | fs/ext/namei.c | dir->i_dev, dir->i_ino, offset, de->rec_len, de->name_len); |
de | 131 | fs/ext/namei.c | de = (struct ext_dir_entry *) (bh->b_data+BLOCK_SIZE); |
de | 137 | fs/ext/namei.c | if (ext_match(namelen,name,de)) { |
de | 138 | fs/ext/namei.c | *res_dir = de; |
de | 140 | fs/ext/namei.c | if (offset + de->rec_len < dir->i_size && |
de | 141 | fs/ext/namei.c | ((char *)de) + de->rec_len < BLOCK_SIZE+bh->b_data) |
de | 143 | fs/ext/namei.c | ((char *) de + de->rec_len); |
de | 148 | fs/ext/namei.c | offset += de->rec_len; |
de | 150 | fs/ext/namei.c | *prev_dir = de; |
de | 151 | fs/ext/namei.c | de = (struct ext_dir_entry *) ((char *) de + de->rec_len); |
de | 161 | fs/ext/namei.c | struct ext_dir_entry * de; |
de | 171 | fs/ext/namei.c | if (!(bh = ext_find_entry(dir,name,len,&de,NULL,NULL))) { |
de | 175 | fs/ext/namei.c | ino = de->inode; |
de | 202 | fs/ext/namei.c | struct ext_dir_entry * de, * de1; |
de | 221 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
de | 223 | fs/ext/namei.c | if ((char *)de >= BLOCK_SIZE+bh->b_data && offset < dir->i_size) { |
de | 232 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
de | 242 | fs/ext/namei.c | de->inode = 0; |
de | 243 | fs/ext/namei.c | de->rec_len = BLOCK_SIZE |
de | 245 | fs/ext/namei.c | de->name_len = 0; |
de | 246 | fs/ext/namei.c | offset += de->rec_len; |
de | 247 | fs/ext/namei.c | dir->i_size += de->rec_len; |
de | 262 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
de | 265 | fs/ext/namei.c | de->inode=0; |
de | 266 | fs/ext/namei.c | de->rec_len = rec_len; |
de | 267 | fs/ext/namei.c | dir->i_size += de->rec_len; |
de | 273 | fs/ext/namei.c | if (de->rec_len < 8 || de->rec_len % 4 != 0 || |
de | 274 | fs/ext/namei.c | de->rec_len < de->name_len + 8 || |
de | 275 | fs/ext/namei.c | (((char *) de) + de->rec_len-1 >= BLOCK_SIZE+bh->b_data)) { |
de | 278 | fs/ext/namei.c | dir->i_dev, dir->i_ino, offset, de->rec_len, de->name_len); |
de | 282 | fs/ext/namei.c | if (!de->inode && de->rec_len >= rec_len) { |
de | 283 | fs/ext/namei.c | if (de->rec_len > rec_len |
de | 284 | fs/ext/namei.c | && de->rec_len - rec_len >= EXT_DIR_MIN_SIZE) { |
de | 289 | fs/ext/namei.c | de1 = (struct ext_dir_entry *) ((char *) de + rec_len); |
de | 291 | fs/ext/namei.c | de1->rec_len = de->rec_len - rec_len; |
de | 293 | fs/ext/namei.c | de->rec_len = rec_len; |
de | 296 | fs/ext/namei.c | de->name_len = namelen; |
de | 298 | fs/ext/namei.c | de->name[i] = name[i]; |
de | 300 | fs/ext/namei.c | *res_dir = de; |
de | 303 | fs/ext/namei.c | offset += de->rec_len; |
de | 304 | fs/ext/namei.c | de = (struct ext_dir_entry *) ((char *) de + de->rec_len); |
de | 315 | fs/ext/namei.c | struct ext_dir_entry * de; |
de | 328 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
de | 336 | fs/ext/namei.c | de->inode = inode->i_ino; |
de | 348 | fs/ext/namei.c | struct ext_dir_entry * de; |
de | 352 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
de | 387 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
de | 395 | fs/ext/namei.c | de->inode = inode->i_ino; |
de | 407 | fs/ext/namei.c | struct ext_dir_entry * de; |
de | 409 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
de | 437 | fs/ext/namei.c | de = (struct ext_dir_entry *) dir_block->b_data; |
de | 438 | fs/ext/namei.c | de->inode=inode->i_ino; |
de | 439 | fs/ext/namei.c | de->rec_len=16; |
de | 440 | fs/ext/namei.c | de->name_len=1; |
de | 441 | fs/ext/namei.c | strcpy(de->name,"."); |
de | 442 | fs/ext/namei.c | de = (struct ext_dir_entry *) ((char *) de + de->rec_len); |
de | 443 | fs/ext/namei.c | de->inode = dir->i_ino; |
de | 444 | fs/ext/namei.c | de->rec_len=16; |
de | 445 | fs/ext/namei.c | de->name_len=2; |
de | 446 | fs/ext/namei.c | strcpy(de->name,".."); |
de | 454 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
de | 461 | fs/ext/namei.c | de->inode = inode->i_ino; |
de | 478 | fs/ext/namei.c | struct ext_dir_entry * de, * de1; |
de | 484 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
de | 485 | fs/ext/namei.c | de1 = (struct ext_dir_entry *) ((char *) de + de->rec_len); |
de | 486 | fs/ext/namei.c | if (de->inode != inode->i_ino || !de1->inode || |
de | 487 | fs/ext/namei.c | strcmp(".",de->name) || strcmp("..",de1->name)) { |
de | 491 | fs/ext/namei.c | offset = de->rec_len + de1->rec_len; |
de | 492 | fs/ext/namei.c | de = (struct ext_dir_entry *) ((char *) de1 + de1->rec_len); |
de | 494 | fs/ext/namei.c | if ((void *) de >= (void *) (bh->b_data+BLOCK_SIZE)) { |
de | 501 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
de | 503 | fs/ext/namei.c | if (de->rec_len < 8 || de->rec_len %4 != 0 || |
de | 504 | fs/ext/namei.c | de->rec_len < de->name_len + 8) { |
de | 507 | fs/ext/namei.c | inode->i_dev, inode->i_ino, offset, de->rec_len, de->name_len); |
de | 511 | fs/ext/namei.c | if (de->inode) { |
de | 515 | fs/ext/namei.c | offset += de->rec_len; |
de | 516 | fs/ext/namei.c | de = (struct ext_dir_entry *) ((char *) de + de->rec_len); |
de | 522 | fs/ext/namei.c | static inline void ext_merge_entries (struct ext_dir_entry * de, |
de | 526 | fs/ext/namei.c | de->rec_len += nde->rec_len; |
de | 528 | fs/ext/namei.c | pde->rec_len += de->rec_len; |
de | 536 | fs/ext/namei.c | struct ext_dir_entry * de, * pde, * nde; |
de | 539 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,&pde,&nde); |
de | 544 | fs/ext/namei.c | if (!(inode = iget(dir->i_sb, de->inode))) |
de | 567 | fs/ext/namei.c | de->inode = 0; |
de | 568 | fs/ext/namei.c | de->name_len = 0; |
de | 569 | fs/ext/namei.c | ext_merge_entries (de, pde, nde); |
de | 589 | fs/ext/namei.c | struct ext_dir_entry * de, * pde, * nde; |
de | 593 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,&pde,&nde); |
de | 596 | fs/ext/namei.c | if (!(inode = iget(dir->i_sb, de->inode))) |
de | 610 | fs/ext/namei.c | de->inode = 0; |
de | 611 | fs/ext/namei.c | de->name_len = 0; |
de | 612 | fs/ext/namei.c | ext_merge_entries (de, pde, nde); |
de | 629 | fs/ext/namei.c | struct ext_dir_entry * de; |
de | 657 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
de | 666 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
de | 674 | fs/ext/namei.c | de->inode = inode->i_ino; |
de | 684 | fs/ext/namei.c | struct ext_dir_entry * de; |
de | 697 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
de | 704 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
de | 710 | fs/ext/namei.c | de->inode = oldinode->i_ino; |
de | 69 | fs/ext2/dir.c | struct ext2_dir_entry * de, struct buffer_head * bh, |
de | 74 | fs/ext2/dir.c | if (de->rec_len < EXT2_DIR_REC_LEN(1)) |
de | 76 | fs/ext2/dir.c | else if (de->rec_len % 4 != 0) |
de | 78 | fs/ext2/dir.c | else if (de->rec_len < EXT2_DIR_REC_LEN(de->name_len)) |
de | 80 | fs/ext2/dir.c | else if (dir && ((char *) de - bh->b_data) + de->rec_len > |
de | 87 | fs/ext2/dir.c | error_msg, offset, de->inode, de->rec_len, |
de | 88 | fs/ext2/dir.c | de->name_len); |
de | 98 | fs/ext2/dir.c | struct ext2_dir_entry * de; |
de | 113 | fs/ext2/dir.c | de = (struct ext2_dir_entry *) (offset + bh->b_data); |
de | 115 | fs/ext2/dir.c | if (! ext2_check_dir_entry ("ext2_readdir", inode, de, |
de | 120 | fs/ext2/dir.c | offset += de->rec_len; |
de | 121 | fs/ext2/dir.c | filp->f_pos += de->rec_len; |
de | 122 | fs/ext2/dir.c | if (de->inode) { |
de | 123 | fs/ext2/dir.c | memcpy_tofs (dirent->d_name, de->name, |
de | 124 | fs/ext2/dir.c | de->name_len); |
de | 125 | fs/ext2/dir.c | put_fs_long (de->inode, &dirent->d_ino); |
de | 126 | fs/ext2/dir.c | put_fs_byte (0, de->name_len + dirent->d_name); |
de | 127 | fs/ext2/dir.c | put_fs_word (de->name_len, &dirent->d_reclen); |
de | 130 | fs/ext2/dir.c | de->name, de->name_len, |
de | 131 | fs/ext2/dir.c | de->inode); |
de | 133 | fs/ext2/dir.c | i = de->name_len; |
de | 141 | fs/ext2/dir.c | de = (struct ext2_dir_entry *) ((char *) de + |
de | 142 | fs/ext2/dir.c | de->rec_len); |
de | 35 | fs/ext2/namei.c | struct ext2_dir_entry * de) |
de | 39 | fs/ext2/namei.c | if (!de || !de->inode || len > EXT2_NAME_LEN) |
de | 42 | fs/ext2/namei.c | if (!len && de->name_len == 1 && (de->name[0] == '.') && |
de | 43 | fs/ext2/namei.c | (de->name[1] == '\0')) |
de | 45 | fs/ext2/namei.c | if (len != de->name_len) |
de | 51 | fs/ext2/namei.c | :"S" ((long) name), "D" ((long) de->name), "c" (len) |
de | 71 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 90 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
de | 92 | fs/ext2/namei.c | if (!bh || (char *)de >= sb->s_blocksize + bh->b_data) { |
de | 99 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
de | 101 | fs/ext2/namei.c | if (! ext2_check_dir_entry ("ext2_find_entry", dir, de, bh, |
de | 106 | fs/ext2/namei.c | if (de->inode != 0 && ext2_match (namelen, name, de)) { |
de | 107 | fs/ext2/namei.c | *res_dir = de; |
de | 110 | fs/ext2/namei.c | offset += de->rec_len; |
de | 111 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) ((char *) de + de->rec_len); |
de | 121 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 134 | fs/ext2/namei.c | if (!(bh = ext2_find_entry (dir, name, len, &de))) { |
de | 138 | fs/ext2/namei.c | ino = de->inode; |
de | 140 | fs/ext2/namei.c | ext2_dcache_add (dir->i_dev, dir->i_ino, de->name, |
de | 141 | fs/ext2/namei.c | de->name_len, ino); |
de | 173 | fs/ext2/namei.c | struct ext2_dir_entry * de, * de1; |
de | 202 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
de | 205 | fs/ext2/namei.c | if ((char *)de >= sb->s_blocksize + bh->b_data) { |
de | 219 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
de | 220 | fs/ext2/namei.c | de->inode = 0; |
de | 221 | fs/ext2/namei.c | de->rec_len = sb->s_blocksize; |
de | 231 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
de | 234 | fs/ext2/namei.c | if (! ext2_check_dir_entry ("ext2_add_entry", dir, de, bh, |
de | 240 | fs/ext2/namei.c | if (de->inode != 0 && ext2_match (namelen, name, de)) { |
de | 245 | fs/ext2/namei.c | if ((de->inode == 0 && de->rec_len >= rec_len) || |
de | 246 | fs/ext2/namei.c | (de->rec_len >= EXT2_DIR_REC_LEN(de->name_len) + rec_len)) { |
de | 247 | fs/ext2/namei.c | offset += de->rec_len; |
de | 248 | fs/ext2/namei.c | if (de->inode) { |
de | 249 | fs/ext2/namei.c | de1 = (struct ext2_dir_entry *) ((char *) de + |
de | 250 | fs/ext2/namei.c | EXT2_DIR_REC_LEN(de->name_len)); |
de | 251 | fs/ext2/namei.c | de1->rec_len = de->rec_len - |
de | 252 | fs/ext2/namei.c | EXT2_DIR_REC_LEN(de->name_len); |
de | 253 | fs/ext2/namei.c | de->rec_len = EXT2_DIR_REC_LEN(de->name_len); |
de | 254 | fs/ext2/namei.c | de = de1; |
de | 256 | fs/ext2/namei.c | de->inode = 0; |
de | 257 | fs/ext2/namei.c | de->name_len = namelen; |
de | 258 | fs/ext2/namei.c | memcpy (de->name, name, namelen); |
de | 273 | fs/ext2/namei.c | *res_dir = de; |
de | 277 | fs/ext2/namei.c | offset += de->rec_len; |
de | 278 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) ((char *) de + de->rec_len); |
de | 291 | fs/ext2/namei.c | struct ext2_dir_entry * de, * pde; |
de | 296 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
de | 299 | fs/ext2/namei.c | de, bh, i)) |
de | 301 | fs/ext2/namei.c | if (de == dir) { |
de | 308 | fs/ext2/namei.c | i += de->rec_len; |
de | 309 | fs/ext2/namei.c | pde = de; |
de | 310 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) ((char *) de + de->rec_len); |
de | 320 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 334 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
de | 342 | fs/ext2/namei.c | de->inode = inode->i_ino; |
de | 344 | fs/ext2/namei.c | ext2_dcache_add (dir->i_dev, dir->i_ino, de->name, de->name_len, |
de | 345 | fs/ext2/namei.c | de->inode); |
de | 363 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 368 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
de | 408 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
de | 416 | fs/ext2/namei.c | de->inode = inode->i_ino; |
de | 418 | fs/ext2/namei.c | ext2_dcache_add (dir->i_dev, dir->i_ino, de->name, de->name_len, |
de | 419 | fs/ext2/namei.c | de->inode); |
de | 436 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 441 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
de | 470 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) dir_block->b_data; |
de | 471 | fs/ext2/namei.c | de->inode = inode->i_ino; |
de | 472 | fs/ext2/namei.c | de->name_len = 1; |
de | 473 | fs/ext2/namei.c | de->rec_len = EXT2_DIR_REC_LEN(de->name_len); |
de | 474 | fs/ext2/namei.c | strcpy (de->name, "."); |
de | 475 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) ((char *) de + de->rec_len); |
de | 476 | fs/ext2/namei.c | de->inode = dir->i_ino; |
de | 477 | fs/ext2/namei.c | de->rec_len = inode->i_sb->s_blocksize - EXT2_DIR_REC_LEN(1); |
de | 478 | fs/ext2/namei.c | de->name_len = 2; |
de | 479 | fs/ext2/namei.c | strcpy (de->name, ".."); |
de | 487 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
de | 495 | fs/ext2/namei.c | de->inode = inode->i_ino; |
de | 497 | fs/ext2/namei.c | ext2_dcache_add (dir->i_dev, dir->i_ino, de->name, de->name_len, |
de | 498 | fs/ext2/namei.c | de->inode); |
de | 520 | fs/ext2/namei.c | struct ext2_dir_entry * de, * de1; |
de | 531 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
de | 532 | fs/ext2/namei.c | de1 = (struct ext2_dir_entry *) ((char *) de + de->rec_len); |
de | 533 | fs/ext2/namei.c | if (de->inode != inode->i_ino || !de1->inode || |
de | 534 | fs/ext2/namei.c | strcmp (".", de->name) || strcmp ("..", de1->name)) { |
de | 539 | fs/ext2/namei.c | offset = de->rec_len + de1->rec_len; |
de | 540 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) ((char *) de1 + de1->rec_len); |
de | 542 | fs/ext2/namei.c | if ((void *) de >= (void *) (bh->b_data + sb->s_blocksize)) { |
de | 549 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
de | 551 | fs/ext2/namei.c | if (! ext2_check_dir_entry ("empty_dir", inode, de, bh, |
de | 556 | fs/ext2/namei.c | if (de->inode) { |
de | 560 | fs/ext2/namei.c | offset += de->rec_len; |
de | 561 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) ((char *) de + de->rec_len); |
de | 572 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 578 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
de | 583 | fs/ext2/namei.c | if (!(inode = iget (dir->i_sb, de->inode))) |
de | 587 | fs/ext2/namei.c | if (de->inode != inode->i_ino) { |
de | 607 | fs/ext2/namei.c | if (de->inode != inode->i_ino) { |
de | 618 | fs/ext2/namei.c | retval = ext2_delete_entry (de, bh); |
de | 635 | fs/ext2/namei.c | ext2_dcache_remove (dir->i_dev, dir->i_ino, de->name, de->name_len); |
de | 654 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 661 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
de | 664 | fs/ext2/namei.c | if (!(inode = iget (dir->i_sb, de->inode))) |
de | 669 | fs/ext2/namei.c | if (de->inode != inode->i_ino) { |
de | 686 | fs/ext2/namei.c | retval = ext2_delete_entry (de, bh); |
de | 695 | fs/ext2/namei.c | ext2_dcache_remove (dir->i_dev, dir->i_ino, de->name, de->name_len); |
de | 713 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 759 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
de | 768 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
de | 776 | fs/ext2/namei.c | de->inode = inode->i_ino; |
de | 778 | fs/ext2/namei.c | ext2_dcache_add (dir->i_dev, dir->i_ino, de->name, de->name_len, |
de | 779 | fs/ext2/namei.c | de->inode); |
de | 795 | fs/ext2/namei.c | struct ext2_dir_entry * de; |
de | 809 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
de | 816 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
de | 822 | fs/ext2/namei.c | de->inode = oldinode->i_ino; |
de | 824 | fs/ext2/namei.c | ext2_dcache_add (dir->i_dev, dir->i_ino, de->name, de->name_len, |
de | 825 | fs/ext2/namei.c | de->inode); |
de | 264 | fs/hpfs/hpfs.h | static inline dnode_secno de_down_pointer (struct hpfs_dirent *de) |
de | 266 | fs/hpfs/hpfs.h | return *(dnode_secno *) ((void *) de + de->length - 4); |
de | 285 | fs/hpfs/hpfs.h | static inline struct hpfs_dirent *de_next_de (struct hpfs_dirent *de) |
de | 287 | fs/hpfs/hpfs.h | return (void *) de + de->length; |
de | 334 | fs/hpfs/hpfs_fs.c | struct hpfs_dirent *de; |
de | 493 | fs/hpfs/hpfs_fs.c | de = map_dirent(s->s_mounted, root_dno, "\001\001", 2, &qbh); |
de | 494 | fs/hpfs/hpfs_fs.c | if (!root_dno || !de) { |
de | 501 | fs/hpfs/hpfs_fs.c | s->s_mounted->i_atime = local_to_gmt(de->read_date); |
de | 502 | fs/hpfs/hpfs_fs.c | s->s_mounted->i_mtime = local_to_gmt(de->write_date); |
de | 503 | fs/hpfs/hpfs_fs.c | s->s_mounted->i_ctime = local_to_gmt(de->creation_date); |
de | 771 | fs/hpfs/hpfs_fs.c | struct hpfs_dirent *de; |
de | 777 | fs/hpfs/hpfs_fs.c | de = dnode_first_de(dnode); |
de | 782 | fs/hpfs/hpfs_fs.c | for (; de < de_end; de = de_next_de(de)) { |
de | 783 | fs/hpfs/hpfs_fs.c | if (de->down) |
de | 784 | fs/hpfs/hpfs_fs.c | count_dnodes(inode, de_down_pointer(de), |
de | 786 | fs/hpfs/hpfs_fs.c | if (de->directory && !de->first) |
de | 788 | fs/hpfs/hpfs_fs.c | if (de->last || de->length == 0) |
de | 1104 | fs/hpfs/hpfs_fs.c | struct hpfs_dirent *de; |
de | 1122 | fs/hpfs/hpfs_fs.c | de = map_dirent(dir, dir->i_hpfs_dno, "\001\001", 2, &qbh); |
de | 1124 | fs/hpfs/hpfs_fs.c | de = map_dirent(dir, |
de | 1128 | fs/hpfs/hpfs_fs.c | de = map_dirent(dir, dir->i_hpfs_dno, name, len, &qbh); |
de | 1134 | fs/hpfs/hpfs_fs.c | if (!de) |
de | 1141 | fs/hpfs/hpfs_fs.c | if (de->directory) |
de | 1142 | fs/hpfs/hpfs_fs.c | ino = dir_ino(de->fnode); |
de | 1144 | fs/hpfs/hpfs_fs.c | ino = file_ino(de->fnode); |
de | 1159 | fs/hpfs/hpfs_fs.c | inode->i_atime = local_to_gmt(de->read_date); |
de | 1160 | fs/hpfs/hpfs_fs.c | inode->i_mtime = local_to_gmt(de->write_date); |
de | 1161 | fs/hpfs/hpfs_fs.c | inode->i_ctime = local_to_gmt(de->creation_date); |
de | 1162 | fs/hpfs/hpfs_fs.c | if (de->read_only) |
de | 1164 | fs/hpfs/hpfs_fs.c | if (!de->directory) { |
de | 1165 | fs/hpfs/hpfs_fs.c | inode->i_size = de->file_size; |
de | 1231 | fs/hpfs/hpfs_fs.c | struct hpfs_dirent *de; |
de | 1245 | fs/hpfs/hpfs_fs.c | de = dnode_first_de(dnode); |
de | 1251 | fs/hpfs/hpfs_fs.c | for ( ; de < de_end; de = de_next_de(de)) { |
de | 1256 | fs/hpfs/hpfs_fs.c | l = len < de->namelen ? len : de->namelen; |
de | 1257 | fs/hpfs/hpfs_fs.c | t = memcasecmp(name, de->name, l); |
de | 1263 | fs/hpfs/hpfs_fs.c | t = len - de->namelen; |
de | 1266 | fs/hpfs/hpfs_fs.c | return de; |
de | 1276 | fs/hpfs/hpfs_fs.c | if (de->down) { |
de | 1277 | fs/hpfs/hpfs_fs.c | dnode_secno sub_dno = de_down_pointer(de); |
de | 1292 | fs/hpfs/hpfs_fs.c | if (de->last || de->length == 0) |
de | 1332 | fs/hpfs/hpfs_fs.c | struct hpfs_dirent *de; |
de | 1359 | fs/hpfs/hpfs_fs.c | de = map_pos_dirent(inode, &filp->f_pos, &qbh); |
de | 1360 | fs/hpfs/hpfs_fs.c | if (!de) { |
de | 1365 | fs/hpfs/hpfs_fs.c | namelen = de->namelen; |
de | 1366 | fs/hpfs/hpfs_fs.c | if (de->directory) |
de | 1367 | fs/hpfs/hpfs_fs.c | ino = dir_ino(de->fnode); |
de | 1369 | fs/hpfs/hpfs_fs.c | ino = file_ino(de->fnode); |
de | 1370 | 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 | 77 | fs/isofs/dir.c | struct iso_directory_record * de; |
de | 92 | fs/isofs/dir.c | de = (struct iso_directory_record *) (bh->b_data + offset); |
de | 99 | fs/isofs/dir.c | if (*((unsigned char *) de) == 0) { |
de | 117 | fs/isofs/dir.c | offset += *((unsigned char *) de); |
de | 118 | fs/isofs/dir.c | filp->f_pos += *((unsigned char *) de); |
de | 123 | fs/isofs/dir.c | de = (struct iso_directory_record *) |
de | 138 | fs/isofs/dir.c | if (de->name_len[0] == 1 && de->name[0] == 0) { |
de | 146 | fs/isofs/dir.c | else if (de->name_len[0] == 1 && de->name[0] == 1) { |
de | 161 | fs/isofs/dir.c | find_rock_ridge_relocation(de, inode)); |
de | 173 | fs/isofs/dir.c | dlen = de->name_len[0]; |
de | 174 | fs/isofs/dir.c | dpnt = de->name; |
de | 176 | fs/isofs/dir.c | rrflag = get_rock_ridge_filename(de, &dpnt, &dlen, inode); |
de | 192 | fs/isofs/dir.c | if (c == ';' && i == dlen-2 && de->name[i+1] == '1') |
de | 513 | fs/isofs/inode.c | struct iso_directory_record * de; |
de | 520 | fs/isofs/inode.c | de = (struct iso_directory_record *) (bh->b_data + offset); |
de | 521 | fs/isofs/inode.c | if (*((unsigned char *) de) == 0) |
de | 527 | fs/isofs/inode.c | offset += *((unsigned char *) de); |
de | 537 | fs/isofs/inode.c | if (de->name_len[0] == 1 && de->name[0] == 1) |
de | 539 | fs/isofs/inode.c | parent_dir = find_rock_ridge_relocation(de, parent); |
de | 560 | fs/isofs/inode.c | de = (struct iso_directory_record *) (bh->b_data + offset); |
de | 567 | fs/isofs/inode.c | if (*((unsigned char *) de) == 0) |
de | 584 | fs/isofs/inode.c | offset += *((unsigned char *) de); |
de | 590 | fs/isofs/inode.c | de = (struct iso_directory_record *) |
de | 601 | fs/isofs/inode.c | if (find_rock_ridge_relocation(de, parent) == extent){ |
de | 43 | 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 | de = (struct iso_directory_record *) |
de | 132 | fs/isofs/namei.c | if (de->name[0]==0 && de->name_len[0]==1) { |
de | 139 | 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 | 189 | fs/isofs/namei.c | find_rock_ridge_relocation(de,dir)); |
de | 83 | fs/isofs/rock.c | int find_rock_ridge_relocation(struct iso_directory_record * de, |
de | 95 | fs/isofs/rock.c | if (de->name[0]==1 && de->name_len[0]==1) flag = 1; |
de | 97 | fs/isofs/rock.c | retval = isonum_733 (de->extent); |
de | 101 | fs/isofs/rock.c | SETUP_ROCK_RIDGE(de, chr, len); |
de | 156 | fs/isofs/rock.c | int get_rock_ridge_filename(struct iso_directory_record * de, |
de | 167 | fs/isofs/rock.c | SETUP_ROCK_RIDGE(de, chr, len); |
de | 239 | fs/isofs/rock.c | int parse_rock_ridge_inode(struct iso_directory_record * de, |
de | 247 | 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 | 82 | fs/minix/dir.c | if (de->inode) { |
de | 84 | fs/minix/dir.c | if ((c = de->name[i]) != 0) |
de | 89 | 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 | 197 | fs/minix/namei.c | de->name[i] = (i < namelen) ? name[i] : 0; |
de | 199 | fs/minix/namei.c | *res_dir = de; |
de | 219 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 232 | fs/minix/namei.c | error = minix_add_entry(dir,name,len, &bh ,&de); |
de | 240 | fs/minix/namei.c | de->inode = inode->i_ino; |
de | 253 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 257 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
de | 289 | fs/minix/namei.c | error = minix_add_entry(dir, name, len, &bh, &de); |
de | 297 | fs/minix/namei.c | de->inode = inode->i_ino; |
de | 310 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 318 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
de | 343 | fs/minix/namei.c | de = (struct minix_dir_entry *) dir_block->b_data; |
de | 344 | fs/minix/namei.c | de->inode=inode->i_ino; |
de | 345 | fs/minix/namei.c | strcpy(de->name,"."); |
de | 346 | fs/minix/namei.c | de = (struct minix_dir_entry *) (dir_block->b_data + info->s_dirsize); |
de | 347 | fs/minix/namei.c | de->inode = dir->i_ino; |
de | 348 | fs/minix/namei.c | strcpy(de->name,".."); |
de | 356 | fs/minix/namei.c | error = minix_add_entry(dir, name, len, &bh, &de); |
de | 363 | fs/minix/namei.c | de->inode = inode->i_ino; |
de | 380 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 396 | fs/minix/namei.c | de = (struct minix_dir_entry *) bh->b_data; |
de | 397 | fs/minix/namei.c | if (!de->inode || strcmp(de->name,".")) |
de | 399 | fs/minix/namei.c | de = (struct minix_dir_entry *) (bh->b_data + info->s_dirsize); |
de | 400 | fs/minix/namei.c | if (!de->inode || strcmp(de->name,"..")) |
de | 410 | fs/minix/namei.c | de = (struct minix_dir_entry *) (bh->b_data + offset); |
de | 412 | fs/minix/namei.c | if (de->inode) { |
de | 436 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 439 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
de | 444 | 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 | 491 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 496 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
de | 499 | fs/minix/namei.c | if (!(inode = iget(dir->i_sb, de->inode))) |
de | 504 | fs/minix/namei.c | if (de->inode != inode->i_ino) { |
de | 515 | fs/minix/namei.c | if (de->inode != inode->i_ino) { |
de | 524 | fs/minix/namei.c | de->inode = 0; |
de | 541 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 569 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
de | 578 | fs/minix/namei.c | i = minix_add_entry(dir, name, len, &bh, &de); |
de | 586 | fs/minix/namei.c | de->inode = inode->i_ino; |
de | 597 | fs/minix/namei.c | struct minix_dir_entry * de; |
de | 610 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
de | 617 | fs/minix/namei.c | error = minix_add_entry(dir, name, len, &bh, &de); |
de | 623 | fs/minix/namei.c | de->inode = oldinode->i_ino; |
de | 63 | fs/msdos/dir.c | struct msdos_dir_entry *de; |
de | 81 | fs/msdos/dir.c | while ((ino = msdos_get_entry(inode,&filp->f_pos,&bh,&de)) > -1) { |
de | 82 | fs/msdos/dir.c | if (!IS_FREE(de->name) && !(de->attr & ATTR_VOLUME)) { |
de | 84 | fs/msdos/dir.c | if (!(c = de->name[i])) break; |
de | 93 | fs/msdos/dir.c | if (!(c = de->ext[i2])) break; |
de | 100 | fs/msdos/dir.c | if (!strcmp(de->name,MSDOS_DOT)) |
de | 102 | fs/msdos/dir.c | else if (!strcmp(de->name,MSDOS_DOTDOT)) |
de | 268 | fs/msdos/misc.c | struct msdos_dir_entry **de) |
de | 286 | fs/msdos/misc.c | *de = (struct msdos_dir_entry *) (data+(offset & |
de | 94 | fs/msdos/namei.c | struct buffer_head **bh,struct msdos_dir_entry **de,int *ino) |
de | 101 | fs/msdos/namei.c | return msdos_scan(dir,msdos_name,bh,de,ino); |
de | 109 | fs/msdos/namei.c | struct msdos_dir_entry *de; |
de | 130 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) { |
de | 165 | fs/msdos/namei.c | struct msdos_dir_entry *de; |
de | 168 | fs/msdos/namei.c | if ((res = msdos_scan(dir,NULL,&bh,&de,&ino)) < 0) { |
de | 172 | fs/msdos/namei.c | if ((res = msdos_scan(dir,NULL,&bh,&de,&ino)) < 0) return res; |
de | 179 | fs/msdos/namei.c | memcpy(de->name,name,MSDOS_NAME); |
de | 180 | fs/msdos/namei.c | de->attr = is_dir ? ATTR_DIR : ATTR_ARCH; |
de | 181 | fs/msdos/namei.c | de->start = 0; |
de | 182 | fs/msdos/namei.c | date_unix2dos(dir->i_mtime,&de->time,&de->date); |
de | 183 | fs/msdos/namei.c | de->size = 0; |
de | 200 | fs/msdos/namei.c | struct msdos_dir_entry *de; |
de | 211 | fs/msdos/namei.c | if (msdos_scan(dir,msdos_name,&bh,&de,&ino) >= 0) { |
de | 247 | fs/msdos/namei.c | struct msdos_dir_entry *de; |
de | 258 | fs/msdos/namei.c | if (msdos_scan(dir,msdos_name,&bh,&de,&ino) >= 0) { |
de | 305 | fs/msdos/namei.c | struct msdos_dir_entry *de; |
de | 312 | fs/msdos/namei.c | while (msdos_get_entry(dir,&pos,&bh,&de) > -1) |
de | 313 | fs/msdos/namei.c | if (!IS_FREE(de->name) && strncmp(de->name,MSDOS_DOT, |
de | 314 | fs/msdos/namei.c | MSDOS_NAME) && strncmp(de->name,MSDOS_DOTDOT, |
de | 330 | fs/msdos/namei.c | struct msdos_dir_entry *de; |
de | 338 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) goto rmdir_done; |
de | 352 | fs/msdos/namei.c | de->name[0] = DELETED_FLAG; |
de | 367 | fs/msdos/namei.c | struct msdos_dir_entry *de; |
de | 372 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) |
de | 386 | fs/msdos/namei.c | de->name[0] = DELETED_FLAG; |
de | 123 | fs/pipe.c | static int pipe_readdir(struct inode * inode, struct file * file, struct dirent * de, int count) |
de | 71 | fs/proc/base.c | int proc_match(int len,const char * name,struct proc_dir_entry * de) |
de | 75 | fs/proc/base.c | if (!de || !de->low_ino) |
de | 78 | fs/proc/base.c | if (!len && (de->name[0]=='.') && (de->name[1]=='\0')) |
de | 80 | fs/proc/base.c | if (de->namelen != len) |
de | 86 | fs/proc/base.c | :"0" (0),"S" ((long) name),"D" ((long) de->name),"c" (len) |
de | 135 | fs/proc/base.c | struct proc_dir_entry * de; |
de | 149 | fs/proc/base.c | de = base_dir + filp->f_pos; |
de | 151 | fs/proc/base.c | i = de->namelen; |
de | 152 | fs/proc/base.c | ino = de->low_ino; |
de | 160 | fs/proc/base.c | put_fs_byte(de->name[i], i+dirent->d_name); |
de | 133 | fs/proc/net.c | struct proc_dir_entry * de; |
de | 141 | fs/proc/net.c | de = net_dir + filp->f_pos; |
de | 143 | fs/proc/net.c | i = de->namelen; |
de | 144 | fs/proc/net.c | ino = de->low_ino; |
de | 150 | fs/proc/net.c | put_fs_byte(de->name[i], i+dirent->d_name); |
de | 141 | fs/proc/root.c | struct proc_dir_entry * de = root_dir + nr; |
de | 144 | fs/proc/root.c | i = de->namelen; |
de | 145 | fs/proc/root.c | put_fs_long(de->low_ino, &dirent->d_ino); |
de | 150 | fs/proc/root.c | put_fs_byte(de->name[i], i+dirent->d_name); |
de | 70 | fs/xiafs/dir.c | struct xiafs_direct * de; |
de | 83 | fs/xiafs/dir.c | de = (struct xiafs_direct *) (offset + bh->b_data); |
de | 85 | fs/xiafs/dir.c | if (de->d_ino > inode->i_sb->u.xiafs_sb.s_ninodes || |
de | 86 | fs/xiafs/dir.c | de->d_rec_len < 12 || |
de | 87 | fs/xiafs/dir.c | (char *)de+de->d_rec_len > XIAFS_ZSIZE(inode->i_sb)+bh->b_data || |
de | 88 | fs/xiafs/dir.c | de->d_name_len < 1 || de->d_name_len + 8 > de->d_rec_len || |
de | 89 | fs/xiafs/dir.c | de->d_name_len > _XIAFS_NAME_LEN || |
de | 90 | fs/xiafs/dir.c | de->d_name[de->d_name_len] ) { |
de | 95 | fs/xiafs/dir.c | offset += de->d_rec_len; |
de | 96 | fs/xiafs/dir.c | filp->f_pos += de->d_rec_len; |
de | 97 | fs/xiafs/dir.c | if (de->d_ino) { |
de | 98 | fs/xiafs/dir.c | for (i = 0; i < de->d_name_len ; i++) |
de | 99 | fs/xiafs/dir.c | put_fs_byte(de->d_name[i],i+dirent->d_name); |
de | 101 | fs/xiafs/dir.c | put_fs_long(de->d_ino,&dirent->d_ino); |
de | 110 | fs/xiafs/dir.c | de = (struct xiafs_direct *) (offset + bh->b_data); |
de | 159 | fs/xiafs/namei.c | struct xiafs_direct * de, * de_pre; |
de | 174 | fs/xiafs/namei.c | de_pre=de=(struct xiafs_direct *)bh->b_data; |
de | 176 | fs/xiafs/namei.c | if (de->d_rec_len != 12 || !de->d_ino || de->d_name_len != 1 || |
de | 177 | fs/xiafs/namei.c | strcmp(de->d_name, ".")) { |
de | 183 | fs/xiafs/namei.c | de_pre=de=(struct xiafs_direct *)(bh->b_data+12); |
de | 188 | fs/xiafs/namei.c | de->d_ino=0; |
de | 189 | fs/xiafs/namei.c | de->d_name_len=0; |
de | 190 | fs/xiafs/namei.c | de->d_name[0]=0; |
de | 191 | fs/xiafs/namei.c | de->d_rec_len=XIAFS_ZSIZE(dir->i_sb); |
de | 195 | fs/xiafs/namei.c | if (de->d_ino > dir->i_sb->u.xiafs_sb.s_ninodes || |
de | 196 | fs/xiafs/namei.c | de->d_rec_len < 12 || |
de | 197 | fs/xiafs/namei.c | (char *)de+de->d_rec_len > bh->b_data+XIAFS_ZSIZE(dir->i_sb) || |
de | 198 | fs/xiafs/namei.c | de->d_name_len + 8 > de->d_rec_len || |
de | 199 | fs/xiafs/namei.c | de->d_name[de->d_name_len]) { |
de | 204 | fs/xiafs/namei.c | if (de->d_ino && |
de | 205 | fs/xiafs/namei.c | RNDUP4(de->d_name_len)+RNDUP4(namelen)+16<=de->d_rec_len) { |
de | 206 | fs/xiafs/namei.c | i=RNDUP4(de->d_name_len)+8; |
de | 207 | fs/xiafs/namei.c | de_pre=de; |
de | 208 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(i+(u_char *)de_pre); |
de | 209 | fs/xiafs/namei.c | de->d_ino=0; |
de | 210 | fs/xiafs/namei.c | de->d_rec_len=de_pre->d_rec_len-i; |
de | 214 | fs/xiafs/namei.c | if (!de->d_ino && RNDUP4(namelen)+8 <= de->d_rec_len) { |
de | 221 | fs/xiafs/namei.c | memcpy(de->d_name, name, namelen); |
de | 222 | fs/xiafs/namei.c | de->d_name[namelen]=0; |
de | 223 | fs/xiafs/namei.c | de->d_name_len=namelen; |
de | 225 | fs/xiafs/namei.c | *res_dir = de; |
de | 230 | fs/xiafs/namei.c | offset+=de->d_rec_len; |
de | 231 | fs/xiafs/namei.c | de_pre=de; |
de | 232 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(bh->b_data+offset); |
de | 249 | fs/xiafs/namei.c | struct xiafs_direct * de; |
de | 262 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
de | 270 | fs/xiafs/namei.c | de->d_ino = inode->i_ino; |
de | 282 | fs/xiafs/namei.c | struct xiafs_direct * de; |
de | 286 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir,name,len,&de, NULL); |
de | 319 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
de | 327 | fs/xiafs/namei.c | de->d_ino = inode->i_ino; |
de | 339 | fs/xiafs/namei.c | struct xiafs_direct * de; |
de | 341 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir,name,len,&de, NULL); |
de | 367 | fs/xiafs/namei.c | de = (struct xiafs_direct *) dir_block->b_data; |
de | 368 | fs/xiafs/namei.c | de->d_ino=inode->i_ino; |
de | 369 | fs/xiafs/namei.c | strcpy(de->d_name,"."); |
de | 370 | fs/xiafs/namei.c | de->d_name_len=1; |
de | 371 | fs/xiafs/namei.c | de->d_rec_len=12; |
de | 372 | fs/xiafs/namei.c | de =(struct xiafs_direct *)(12 + dir_block->b_data); |
de | 373 | fs/xiafs/namei.c | de->d_ino = dir->i_ino; |
de | 374 | fs/xiafs/namei.c | strcpy(de->d_name,".."); |
de | 375 | fs/xiafs/namei.c | de->d_name_len=2; |
de | 376 | fs/xiafs/namei.c | de->d_rec_len=XIAFS_ZSIZE(dir->i_sb)-12; |
de | 384 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
de | 391 | fs/xiafs/namei.c | de->d_ino = inode->i_ino; |
de | 408 | fs/xiafs/namei.c | struct xiafs_direct * de; |
de | 423 | fs/xiafs/namei.c | de=(struct xiafs_direct *)bh->b_data; |
de | 424 | fs/xiafs/namei.c | if (de->d_ino != inode->i_ino || strcmp(".", de->d_name) || |
de | 425 | fs/xiafs/namei.c | de->d_rec_len != 12 ) { |
de | 430 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(12 + bh->b_data); |
de | 431 | fs/xiafs/namei.c | if (!de->d_ino || strcmp("..", de->d_name)) { |
de | 436 | fs/xiafs/namei.c | offset=de->d_rec_len+12; |
de | 443 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(bh->b_data+offset); |
de | 444 | fs/xiafs/namei.c | if (de->d_ino > inode->i_sb->u.xiafs_sb.s_ninodes || |
de | 445 | fs/xiafs/namei.c | de->d_rec_len < 12 || |
de | 446 | fs/xiafs/namei.c | (char *)de+de->d_rec_len > bh->b_data+XIAFS_ZSIZE(inode->i_sb) || |
de | 447 | fs/xiafs/namei.c | de->d_name_len + 8 > de->d_rec_len || |
de | 448 | fs/xiafs/namei.c | de->d_name[de->d_name_len]) { |
de | 453 | fs/xiafs/namei.c | if (de->d_ino) { |
de | 457 | fs/xiafs/namei.c | offset+=de->d_rec_len; |
de | 464 | fs/xiafs/namei.c | static void xiafs_rm_entry(struct xiafs_direct *de, struct xiafs_direct * de_pre) |
de | 466 | fs/xiafs/namei.c | if (de==de_pre) { |
de | 467 | fs/xiafs/namei.c | de->d_ino=0; |
de | 470 | fs/xiafs/namei.c | while (de_pre->d_rec_len+(u_char *)de_pre < (u_char *)de) { |
de | 477 | fs/xiafs/namei.c | if (de_pre->d_rec_len+(u_char *)de_pre > (u_char *)de) { |
de | 481 | fs/xiafs/namei.c | de_pre->d_rec_len+=de->d_rec_len; |
de | 489 | fs/xiafs/namei.c | struct xiafs_direct * de, * de_pre; |
de | 492 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir, name, len, &de, &de_pre); |
de | 497 | fs/xiafs/namei.c | if (!(inode = iget(dir->i_sb, de->d_ino))) |
de | 520 | fs/xiafs/namei.c | xiafs_rm_entry(de, de_pre); |
de | 540 | fs/xiafs/namei.c | struct xiafs_direct * de, * de_pre; |
de | 545 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir, name, len, &de, &de_pre); |
de | 548 | fs/xiafs/namei.c | if (!(inode = iget(dir->i_sb, de->d_ino))) |
de | 553 | fs/xiafs/namei.c | if (de->d_ino != inode->i_ino) { |
de | 568 | fs/xiafs/namei.c | xiafs_rm_entry(de, de_pre); |
de | 585 | fs/xiafs/namei.c | struct xiafs_direct * de; |
de | 591 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir,name,len, &de, NULL); |
de | 618 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
de | 626 | fs/xiafs/namei.c | de->d_ino = inode->i_ino; |
de | 637 | fs/xiafs/namei.c | struct xiafs_direct * de; |
de | 650 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir, name, len, &de, NULL); |
de | 657 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
de | 663 | fs/xiafs/namei.c | de->d_ino = oldinode->i_ino; |
de | 137 | include/linux/msdos_fs.h | struct msdos_dir_entry **de); |